Skip to content

Instantly share code, notes, and snippets.

@Casm82 Casm82/krb_test.js
Created Dec 15, 2018

Embed
What would you like to do?
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/dz0aHnGIOHmbuFOIKXpunXkbuAfsPM5xrPza3Shht4WFDTBv3ieTMKOhocNcPReF2B4EyoTL0J9505DXl1ZKH8IvNFqe2Q7SvQrrwUneuyb0sEh+ww6CjuOQ4MHmBf43TVvSycDnGRr2syyrIfWm+EQFJAMYLr/UqHGiLOPC8I4SR6vdqw+R0idYfqOdVjCkju13Fa+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Z+Ojeq1b3UHBE7y9/qbZzGh5QlnHIcL4ZeKJOXP2nRMA+1HvpZbwoFWMqPBSlQqyDXZB0WCyj/ijYdAs43N1q77HDT9Vp6LVXUFT+phuWc8xV6Io0XNk0TWKk7KaAz99BJc3IVuINjfXG8xrMTEShBXlp1RbYfTHSGHS0lsRekIQEP9gsxJ/jT5wa8p0tpgcWG0EoTBIPi0qZXXsIXqce+BTcbf/bj3QVQGBPUgfX1TRbbc+SMpR4b+VgDB3MoJyHU=";
//init server
kerberos.initializeServer(krbSvc, function(err, krbServer) {
if (err) console.error(err);
//check ticket
krbServer.step(ticket, function(err) {
if (err) console.error(err);
console.log(krbServer);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.