Test for object identity
This commit is contained in:
@@ -36,7 +36,7 @@ class WEPAttackType(object):
|
|||||||
self.value = value
|
self.value = value
|
||||||
return
|
return
|
||||||
raise Exception("Attack number %d not found" % var)
|
raise Exception("Attack number %d not found" % var)
|
||||||
elif type(var) == str:
|
elif type(var) is str:
|
||||||
for (name,value) in WEPAttackType.__dict__.iteritems():
|
for (name,value) in WEPAttackType.__dict__.iteritems():
|
||||||
if type(value) is int:
|
if type(value) is int:
|
||||||
if name == var:
|
if name == var:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class Airmon(object):
|
|||||||
|
|
||||||
def get(self, index):
|
def get(self, index):
|
||||||
''' Gets interface at index (starts at 1) '''
|
''' Gets interface at index (starts at 1) '''
|
||||||
if type(index) == str:
|
if type(index) is str:
|
||||||
index = int(index)
|
index = int(index)
|
||||||
return self.interfaces[index - 1]
|
return self.interfaces[index - 1]
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Process(object):
|
|||||||
Returns tuple:
|
Returns tuple:
|
||||||
(stdout, stderr)
|
(stdout, stderr)
|
||||||
'''
|
'''
|
||||||
if type(command) != str or ' ' in command or shell:
|
if type(command) is not str or ' ' in command or shell:
|
||||||
shell = True
|
shell = True
|
||||||
if Configuration.verbose > 1:
|
if Configuration.verbose > 1:
|
||||||
Color.pe("\n {C}[?] {W} Executing (Shell): {B}%s{W}" % command)
|
Color.pe("\n {C}[?] {W} Executing (Shell): {B}%s{W}" % command)
|
||||||
|
|||||||
Reference in New Issue
Block a user