예제 #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
 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
                    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:
예제 #7
0
        if capfile == '<all>':
            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:
예제 #8
0
 def testHandshakeAircrack(self):
     hs_file = self.getFile('handshake_exists.cap')
     hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
     assert (len(hs.aircrack_handshakes()) > 0)
예제 #9
0
 def testHandshakeCowpatty(self):
     hs_file = self.getFile('handshake_exists.cap')
     hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
     hs.divine_bssid_and_essid()
     assert (len(hs.cowpatty_handshakes()) > 0)
예제 #10
0
 def testHandshakeAircrack(self):
     hs_file = self.getFile('handshake_exists.cap')
     hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
     assert(len(hs.aircrack_handshakes()) > 0)
예제 #11
0
 def testHandshakeCowpatty(self):
     hs_file = self.getFile('handshake_exists.cap')
     hs = Handshake(hs_file, bssid='A4:2B:8C:16:6B:3A')
     hs.divine_bssid_and_essid()
     assert(len(hs.cowpatty_handshakes()) > 0)