From 48f74171772f9ed51f8a3c843eea73d22967ec20 Mon Sep 17 00:00:00 2001 From: deix Date: Tue, 29 Aug 2017 18:19:50 +0200 Subject: [PATCH] Test for object identity --- py/Aireplay.py | 2 +- py/Airmon.py | 2 +- py/Process.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/py/Aireplay.py b/py/Aireplay.py index 74c97d0..30b9959 100644 --- a/py/Aireplay.py +++ b/py/Aireplay.py @@ -36,7 +36,7 @@ class WEPAttackType(object): self.value = value return raise Exception("Attack number %d not found" % var) - elif type(var) == str: + elif type(var) is str: for (name,value) in WEPAttackType.__dict__.iteritems(): if type(value) is int: if name == var: diff --git a/py/Airmon.py b/py/Airmon.py index e22b753..794cdae 100644 --- a/py/Airmon.py +++ b/py/Airmon.py @@ -29,7 +29,7 @@ class Airmon(object): def get(self, index): ''' Gets interface at index (starts at 1) ''' - if type(index) == str: + if type(index) is str: index = int(index) return self.interfaces[index - 1] diff --git a/py/Process.py b/py/Process.py index 622fb50..51a2c67 100644 --- a/py/Process.py +++ b/py/Process.py @@ -23,7 +23,7 @@ class Process(object): Returns tuple: (stdout, stderr) ''' - if type(command) != str or ' ' in command or shell: + if type(command) is not str or ' ' in command or shell: shell = True if Configuration.verbose > 1: Color.pe("\n {C}[?] {W} Executing (Shell): {B}%s{W}" % command)