コード例 #1
0
 def testAnalyze(self):
     hs_file = self.getFile('handshake_exists.cap')
     hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
     try:
         hs.analyze()
     except Exception, e:
         fail()
コード例 #2
0
ファイル: test_Handshake.py プロジェクト: schoonc/wifite2
 def testAnalyze(self):
     hs_file = self.getFile('handshake_exists.cap')
     hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
     try:
         hs.analyze()
     except Exception, e:
         fail()
コード例 #3
0
ファイル: Wifite.py プロジェクト: wflk/wifite2
 def check_handshake(self, capfile):
     ''' Analyzes .cap file for handshake '''
     Color.pl('{+} checking for handshake in .cap file {C}%s{W}' % capfile)
     if not os.path.exists(capfile):
         Color.pl('{!} {O}.cap file {C}%s{O} not found{W}' % capfile)
         return
     hs = Handshake(capfile)
     hs.analyze()
コード例 #4
0
 def check_handshake(self, capfile):
     ''' Analyzes .cap file for handshake '''
     Color.pl('{+} checking for handshake in .cap file {C}%s{W}' % capfile)
     if not os.path.exists(capfile):
         Color.pl('{!} {O}.cap file {C}%s{O} not found{W}' % capfile)
         return
     hs = Handshake(capfile, bssid=Configuration.target_bssid, essid=Configuration.target_essid)
     hs.analyze()
コード例 #5
0
 def check_handshake(self, capfile):
     ''' Analyzes .cap file for handshake '''
     Color.pl('{+} checking for handshake in .cap file {C}%s{W}' % capfile)
     if not os.path.exists(capfile):
         Color.pl('{!} {O}.cap file {C}%s{O} not found{W}' % capfile)
         return
     hs = Handshake(capfile)
     hs.analyze()
コード例 #6
0
ファイル: Wifite.py プロジェクト: inc775/wifite2
            except OSError, e:
                capfiles = []
            if len(capfiles) == 0:
                Color.pl('{!} {R}no .cap files found in {O}"./hs"{W}\n')
        else:
            capfiles = [capfile]
        for capfile in capfiles:
            Color.pl('{+} checking for handshake in .cap file {C}%s{W}' %
                     capfile)
            if not os.path.exists(capfile):
                Color.pl('{!} {O}.cap file {C}%s{O} not found{W}' % capfile)
                return
            hs = Handshake(capfile,
                           bssid=Configuration.target_bssid,
                           essid=Configuration.target_essid)
            hs.analyze()
            Color.pl('')

    def run(self):
        '''
            Main program.
            1) Scans for targets, asks user to select targets
            2) Attacks each target
        '''
        s = Scanner()
        if s.target:
            # We found the target we want
            targets = [s.target]
        else:
            targets = s.select_targets()
コード例 #7
0
ファイル: Wifite.py プロジェクト: j1m1h3ndr1x/wifite2
            Color.pl('{+} checking all handshakes in {G}"./hs"{W} directory\n')
            try:
                capfiles = [os.path.join('hs', x) for x in os.listdir('hs') if x.endswith('.cap')]
            except OSError, e:
                capfiles = []
            if len(capfiles) == 0:
                Color.pl('{!} {R}no .cap files found in {O}"./hs"{W}\n')
        else:
            capfiles = [capfile]
        for capfile in capfiles:
            Color.pl('{+} checking for handshake in .cap file {C}%s{W}' % capfile)
            if not os.path.exists(capfile):
                Color.pl('{!} {O}.cap file {C}%s{O} not found{W}' % capfile)
                return
            hs = Handshake(capfile, bssid=Configuration.target_bssid, essid=Configuration.target_essid)
            hs.analyze()
            Color.pl('')


    def run(self):
        '''
            Main program.
            1) Scans for targets, asks user to select targets
            2) Attacks each target
        '''
        s = Scanner()
        if s.target:
            # We found the target we want
            targets = [s.target]
        else:
            targets = s.select_targets()