changed comparison operators that generate syntax warnings
parent
9790c67620
commit
ed8c91ab60
|
@ -68,7 +68,7 @@ class mssql(connection):
|
||||||
# Probably a better way of doing this, grab our IP from the socket
|
# Probably a better way of doing this, grab our IP from the socket
|
||||||
self.local_ip = str(self.conn.socket).split()[2].split('=')[1].split(':')[0]
|
self.local_ip = str(self.conn.socket).split()[2].split('=')[1].split(':')[0]
|
||||||
|
|
||||||
if self.args.auth_type is 'windows':
|
if self.args.auth_type == 'windows':
|
||||||
try:
|
try:
|
||||||
smb_conn = SMBConnection(self.host, self.host, None)
|
smb_conn = SMBConnection(self.host, self.host, None)
|
||||||
try:
|
try:
|
||||||
|
@ -140,7 +140,7 @@ class mssql(connection):
|
||||||
query_output = self.conn._MSSQL__rowsPrinter.getMessage()
|
query_output = self.conn._MSSQL__rowsPrinter.getMessage()
|
||||||
logging.debug("'sysadmin' group members:\n{}".format(query_output))
|
logging.debug("'sysadmin' group members:\n{}".format(query_output))
|
||||||
|
|
||||||
if self.args.auth_type is 'windows':
|
if self.args.auth_type == 'windows':
|
||||||
search_string = '{}\\{}'.format(self.domain, self.username)
|
search_string = '{}\\{}'.format(self.domain, self.username)
|
||||||
else:
|
else:
|
||||||
search_string = self.username
|
search_string = self.username
|
||||||
|
@ -156,7 +156,7 @@ class mssql(connection):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def plaintext_login(self, domain, username, password):
|
def plaintext_login(self, domain, username, password):
|
||||||
res = self.conn.login(None, username, password, domain, None, True if self.args.auth_type is 'windows' else False)
|
res = self.conn.login(None, username, password, domain, None, self.args.auth_type == 'windows')
|
||||||
if res is not True:
|
if res is not True:
|
||||||
self.conn.printReplies()
|
self.conn.printReplies()
|
||||||
return False
|
return False
|
||||||
|
@ -170,7 +170,7 @@ class mssql(connection):
|
||||||
if self.admin_privs:
|
if self.admin_privs:
|
||||||
self.db.add_admin_user('plaintext', domain, username, password, self.host)
|
self.db.add_admin_user('plaintext', domain, username, password, self.host)
|
||||||
|
|
||||||
out = u'{}{}:{} {}'.format('{}\\'.format(domain) if self.args.auth_type is 'windows' else '',
|
out = u'{}{}:{} {}'.format('{}\\'.format(domain) if self.args.auth_type == 'windows' else '',
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else ''))
|
highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else ''))
|
||||||
|
|
|
@ -907,7 +907,7 @@ class smb(connection):
|
||||||
|
|
||||||
if self.remote_ops and self.bootkey:
|
if self.remote_ops and self.bootkey:
|
||||||
try:
|
try:
|
||||||
if self.args.ntds is 'vss':
|
if self.args.ntds == 'vss':
|
||||||
NTDSFileName = self.remote_ops.saveNTDS()
|
NTDSFileName = self.remote_ops.saveNTDS()
|
||||||
use_vss_method = True
|
use_vss_method = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue