def get_owa_domain(self, url): # Stolen from https://github.com/dafthack/MailSniper auth_header = {"Authorization": "NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"} r = requests.post(url, headers=auth_header, verify=False) if r.status_code == 401: ntlm_info = ntlmdecode(r.headers["WWW-Authenticate"]) return ntlm_info["NetBIOS_Domain_Name"]
def get_owa_domain(self, url): # Stolen from https://github.com/dafthack/MailSniper auth_header = { "Authorization": "NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAGAbEdAAAADw==" } r = requests.post(url, headers=auth_header, verify=False) if r.status_code == 401: ntlm_info = ntlmdecode(r.headers["WWW-Authenticate"]) return ntlm_info["NetBIOS_Domain_Name"]