Skip to content

Instantly share code, notes, and snippets.

Alexander Casm82

  • Russia, Izhevsk
Block or report user

Report or block Casm82

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View node_ad_1.2.9_search_utf8_ou.json
{"name":"ADDebug","hostname":"client02","pid":12858,"level":10,"msg":"Using username/password (nodejs@domain.org/********) to bind to ActiveDirectory (ldap://192.168.1.1).","time":"2019-10-03T10:27:52.852Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12858,"level":10,"msg":"Referrals are disabled","time":"2019-10-03T10:27:52.855Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12858,"level":10,"msg":"Default user attributes: [\"dn\",\"distinguishedName\",\"userPrincipalName\",\"sAMAccountName\",\"mail\",\"lockoutTime\",\"whenCreated\",\"pwdLastSet\",\"userAccountControl\",\"employeeID\",\"sn\",\"givenName\",\"initials\",\"cn\",\"displayName\",\"comment\",\"description\"]","time":"2019-10-03T10:27:52.855Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12858,"level":10,"msg":"Default group attributes: [\"dn\",\"cn\",\"description\",\"distinguishedName\",\"objectCategory\"]","time":"2019-10-03T10:27:52.855Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12858,"level":10,"msg":"getGro
View node_ad_1.2.9_search_ascii_ou.json
{"name":"ADDebug","hostname":"client02","pid":12843,"level":10,"msg":"Using username/password (nodejs@domain.org/********) to bind to ActiveDirectory (ldap://192.168.1.1).","time":"2019-10-03T10:27:28.604Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12843,"level":10,"msg":"Referrals are disabled","time":"2019-10-03T10:27:28.607Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12843,"level":10,"msg":"Default user attributes: [\"dn\",\"distinguishedName\",\"userPrincipalName\",\"sAMAccountName\",\"mail\",\"lockoutTime\",\"whenCreated\",\"pwdLastSet\",\"userAccountControl\",\"employeeID\",\"sn\",\"givenName\",\"initials\",\"cn\",\"displayName\",\"comment\",\"description\"]","time":"2019-10-03T10:27:28.607Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12843,"level":10,"msg":"Default group attributes: [\"dn\",\"cn\",\"description\",\"distinguishedName\",\"objectCategory\"]","time":"2019-10-03T10:27:28.607Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12843,"level":10,"msg":"getGro
View node_ad_1.2.8_search_utf8_ou.json
{"name":"ADDebug","hostname":"client02","pid":12945,"level":10,"msg":"Using username/password (nodejs@domain.org/********) to bind to ActiveDirectory (ldap://192.168.1.1).","time":"2019-10-03T10:35:15.462Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12945,"level":10,"msg":"Referrals are disabled","time":"2019-10-03T10:35:15.464Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12945,"level":10,"msg":"Default user attributes: [\"dn\",\"distinguishedName\",\"userPrincipalName\",\"sAMAccountName\",\"mail\",\"lockoutTime\",\"whenCreated\",\"pwdLastSet\",\"userAccountControl\",\"employeeID\",\"sn\",\"givenName\",\"initials\",\"cn\",\"displayName\",\"comment\",\"description\"]","time":"2019-10-03T10:35:15.464Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12945,"level":10,"msg":"Default group attributes: [\"dn\",\"cn\",\"description\",\"distinguishedName\",\"objectCategory\"]","time":"2019-10-03T10:35:15.465Z","v":0}
{"name":"ADDebug","hostname":"client02","pid":12945,"level":10,"msg":"getGro
View krb_test.js
const kerberos = require("kerberos");
const krbSvc = "HTTP@centos.domain.org";
const SegfaultHandler = require('segfault-handler');
SegfaultHandler.registerHandler("crash.log");
let ticket = "YIIGoAYGKwYBBQUCoIIGlDCCBpCgMDAuBgkqhkiC9xIBAgIGCSqGSIb3EgECAgYKKwYBBAGCNwICHgYKKwYBBAGCNwICCqKCBloEggZWYIIGUgYJKoZIhvcSAQICAQBuggZBMIIGPaADAgEFoQMCAQ6iBwMFACAAAACjggR5YYIEdTCCBHGgAwIBBaEMGwpET01BSU4uT1JHoiQwIqADAgECoRswGRsESFRUUBsRY2VudG9zLmRvbWFpbi5vcmejggQ0MIIEMKADAgEXoQMCAQOiggQiBIIEHiB17oIo1fAAIPadrXHY110ZxWvvbem7SazIML5LtDd4RxfIXttvpuYjfMzXT2u8AkiKDN35rYAZ6OAFzts1VuRrnNQLv5/bat4kwSn+B0jf7ZBl4EFW7iewR+9KsvTHdJiWYRjVTyoHSkqKil57U4UxrSmNzCrYDQooa4a5gGhx4nCfZw6MhdzNyfnoNDDDvTWcRi1GXoSDCKXq64S3sYxHH+wz6QF+t20EqlJah+GCEslazt4ubjxhV3G9QuLdbixceTGaDNWxjG3o3MNlfwPWTm0PQElCm3Uq7+dgbIyYBEvublPqgmUolSP+AADQjzozucy4/O+mqYoHsuE0jnDd/uSf+iBHu7r3QAdMtJMjY8znRxhef0RqHWw5z/u0/6W8Z+ATUFkF5M/G8E17IN/yBrqbW+goyIAqL260PHulAuFvCW9U60zUEj7ikJ53PFX/dz0aHnGIOHmbuFOIKXpunXkbuAfsPM5xrPza3Shht4WFDTBv3ieTMKOhocNcPReF2B4EyoTL0J9505DXl1ZKH8IvNF
View gdb_node_krb.log
[node@centos krbAuth]$ gdb --args /opt/node-debug/bin/node krb_test.js
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
View krb_node_inspect.log
break in file:///home/node/krbAuth/krb_test.js:14
12 if (err) console.error(err);
13 //check ticket
>14 krbServer.step(ticket, function(err) {
15 if (err) console.error(err);
16 console.log(krbServer);
debug> n
< PID 20487 received SIGSEGV for address: 0x75
View krb_example_debug.js
const kerberos = require("kerberos");
const express = require("express");
const app = express();
const krbSvc = "HTTP@centos.domain.org";
const SegfaultHandler = require('segfault-handler');
SegfaultHandler.registerHandler("crash.log");
app.get('/', function (req, res) {
console.log('-----request-----');
View krb_example.js
const kerberos = require("kerberos");
const express = require("express");
const app = express();
const krbSvc = "HTTP@centos.domain.org";
app.get('/', function (req, res) {
console.log('-----request-----');
console.log(req.headers);
if (!req.headers.authorization) {
View node_run_7.6.txt
[node@centos7.6 krbAuth]$ export KRB5_KTNAME=/srv/keytabs/krbAuth.keytab
[node@centos7.6 krbAuth]$ klist -k /srv/keytabs/krbAuth.keytab
Keytab name: FILE:/srv/keytabs/krbAuth.keytab
KVNO Principal
---- --------------------------------------------------------------------------
32 HTTP/centos.domain.org@DOMAIN.ORG
[node@centos7.6 krbAuth]$ node krb_example.js
-----request-----
View node_run_7.5.txt
[node@centos7.5 lkrbAuth]$ export KRB5_KTNAME=/srv/keytabs/krbAuth.keytab
[node@centos7.5 krbAuth]$ klist -k /srv/keytabs/krbAuth.keytab
Keytab name: FILE:/srv/keytabs/krbAuth.keytab
KVNO Principal
---- --------------------------------------------------------------------------
32 HTTP/centos.domain.org@DOMAIN.ORG
[node@centos7.5 krbAuth]$ node krb_example.js
-----request-----
You can’t perform that action at this time.