Skip to content

Instantly share code, notes, and snippets.

@dirkjanm
dirkjanm / krbhttp.py
Created September 20, 2021 08:05
Small Kerberos tool to use a service ticket in HTTP context
import struct
import os
import datetime
import base64
from binascii import unhexlify
from pyasn1.type.univ import noValue
from pyasn1.codec.der import decoder, encoder
from ldap3 import Server, Connection, NTLM, ALL, SASL, KERBEROS
from ldap3.core.results import RESULT_STRONGER_AUTH_REQUIRED
from ldap3.operation.bind import bind_operation