MCPcopy
hub / github.com/derv82/wifite2 / check

Method check

wifite/model/handshake.py:200–221  ·  view source on GitHub ↗

Analyzes .cap file(s) for handshake

()

Source from the content-addressed store, hash-verified

198
199 @staticmethod
200 def check():
201 ''' Analyzes .cap file(s) for handshake '''
202 from ..config import Configuration
203 if Configuration.check_handshake == '<all>':
204 Color.pl('{+} checking all handshakes in {G}"./hs"{W} directory\n')
205 try:
206 capfiles = [os.path.join('hs', x) for x in os.listdir('hs') if x.endswith('.cap')]
207 except OSError as e:
208 capfiles = []
209 if len(capfiles) == 0:
210 Color.pl('{!} {R}no .cap files found in {O}"./hs"{W}\n')
211 else:
212 capfiles = [Configuration.check_handshake]
213
214 for capfile in capfiles:
215 Color.pl('{+} checking for handshake in .cap file {C}%s{W}' % capfile)
216 if not os.path.exists(capfile):
217 Color.pl('{!} {O}.cap file {C}%s{O} not found{W}' % capfile)
218 return
219 hs = Handshake(capfile, bssid=Configuration.target_bssid, essid=Configuration.target_essid)
220 hs.analyze()
221 Color.pl('')
222
223
224if __name__ == '__main__':

Callers 1

startMethod · 0.80

Calls 4

analyzeMethod · 0.95
HandshakeClass · 0.85
plMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected