File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,12 +117,16 @@ def initialize(cls, load_interface=True):
117117 manufacturers = './ieee-oui.txt'
118118
119119 if os .path .exists (manufacturers ):
120+ cls .manufacturers = {}
120121 with open (manufacturers , "r" ) as f :
121122 # Parse txt format into dict
122- lines = f .read ().splitlines ()
123- k = lambda line : line .split ()[0 ]
124- v = lambda line : ' ' .join (line .split ()[1 :3 ]).rstrip ('.' )
125- cls .manufacturers = {k (line ):v (line ) for line in lines }
123+ for line in f :
124+ if not re .match (r"^\w" , line ):
125+ continue
126+ line = line .replace ('(hex)' , '' ).replace ('(base 16)' , '' )
127+ fields = line .split ()
128+ if len (fields ) >= 2 :
129+ cls .manufacturers [fields [0 ]] = " " .join (fields [1 :]).rstrip ('.' )
126130
127131 # WPS variables
128132 cls .wps_filter = False # Only attack WPS networks
You can’t perform that action at this time.
0 commit comments