coercer.structures.Credentials
1#!/usr/bin/env python3 2# -*- coding: utf-8 -*- 3# File name : Credentials.py 4# Author : Podalirius (@podalirius_) 5# Date created : 16 Sep 2022 6 7class Credentials(object): 8 """ 9 Documentation for class Credentials 10 """ 11 12 def __init__(self, username, password, domain, lmhash, nthash, doKerberos=False, kdcHost=None): 13 super(Credentials, self).__init__() 14 self.username = username 15 self.password = password 16 self.domain = domain 17 self.lmhash = lmhash 18 self.nthash = nthash 19 self.doKerberos = doKerberos 20 self.kdcHost = kdcHost 21 22 def is_anonymous(self): 23 """ 24 Function is_anonymous() 25 Returns True if anonymous authentication is used False otherwise 26 27 Returns: 28 bool:anonymous 29 """ 30 anonymous = False 31 if self.username is None: 32 anonymous = True 33 elif len(self.username) == 0: 34 anonymous = True 35 else: 36 anonymous = False 37 return anonymous
class
Credentials:
8class Credentials(object): 9 """ 10 Documentation for class Credentials 11 """ 12 13 def __init__(self, username, password, domain, lmhash, nthash, doKerberos=False, kdcHost=None): 14 super(Credentials, self).__init__() 15 self.username = username 16 self.password = password 17 self.domain = domain 18 self.lmhash = lmhash 19 self.nthash = nthash 20 self.doKerberos = doKerberos 21 self.kdcHost = kdcHost 22 23 def is_anonymous(self): 24 """ 25 Function is_anonymous() 26 Returns True if anonymous authentication is used False otherwise 27 28 Returns: 29 bool:anonymous 30 """ 31 anonymous = False 32 if self.username is None: 33 anonymous = True 34 elif len(self.username) == 0: 35 anonymous = True 36 else: 37 anonymous = False 38 return anonymous
Documentation for class Credentials
Credentials( username, password, domain, lmhash, nthash, doKerberos=False, kdcHost=None)
13 def __init__(self, username, password, domain, lmhash, nthash, doKerberos=False, kdcHost=None): 14 super(Credentials, self).__init__() 15 self.username = username 16 self.password = password 17 self.domain = domain 18 self.lmhash = lmhash 19 self.nthash = nthash 20 self.doKerberos = doKerberos 21 self.kdcHost = kdcHost
def
is_anonymous(self):
23 def is_anonymous(self): 24 """ 25 Function is_anonymous() 26 Returns True if anonymous authentication is used False otherwise 27 28 Returns: 29 bool:anonymous 30 """ 31 anonymous = False 32 if self.username is None: 33 anonymous = True 34 elif len(self.username) == 0: 35 anonymous = True 36 else: 37 anonymous = False 38 return anonymous
Function is_anonymous() Returns True if anonymous authentication is used False otherwise
Returns: bool:anonymous