Change output filename for winrm
parent
909f44d155
commit
9f6db06846
|
@ -93,8 +93,6 @@ class winrm(connection):
|
||||||
self.server_os = smb_conn.getServerOS()
|
self.server_os = smb_conn.getServerOS()
|
||||||
self.logger.extra['hostname'] = self.hostname
|
self.logger.extra['hostname'] = self.hostname
|
||||||
|
|
||||||
self.output_filename = os.path.expanduser('~/.cme/logs/{}_{}_{}'.format(self.hostname, self.host, datetime.now().strftime("%Y-%m-%d_%H%M%S")))
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
smb_conn.logoff()
|
smb_conn.logoff()
|
||||||
except:
|
except:
|
||||||
|
@ -109,6 +107,9 @@ class winrm(connection):
|
||||||
if self.args.local_auth:
|
if self.args.local_auth:
|
||||||
self.domain = self.hostname
|
self.domain = self.hostname
|
||||||
|
|
||||||
|
self.output_filename = os.path.expanduser('~/.cme/logs/{}_{}_{}'.format(self.hostname, self.host, datetime.now().strftime("%Y-%m-%d_%H%M%S")))
|
||||||
|
self.output_filename = self.output_filename.replace(":", "-")
|
||||||
|
|
||||||
def laps_search(self, username, password, ntlm_hash, domain):
|
def laps_search(self, username, password, ntlm_hash, domain):
|
||||||
ldapco = LDAPConnect(self.domain, "389", self.domain)
|
ldapco = LDAPConnect(self.domain, "389", self.domain)
|
||||||
connection = ldapco.plaintext_login(domain, username[0] if username else '', password[0] if password else '', ntlm_hash[0] if ntlm_hash else '' )
|
connection = ldapco.plaintext_login(domain, username[0] if username else '', password[0] if password else '', ntlm_hash[0] if ntlm_hash else '' )
|
||||||
|
|
Loading…
Reference in New Issue