Exemplo n.º 1
0
 def StopProbeResquest(self):
     # disable mode monitor card and stop attack
     self.ThreadProbe.stop()
     set_monitor_mode(self.get_placa.currentText()).setDisable()
     self.btn_stop.setEnabled(False)
     self.btn_scan.setEnabled(True)
     self.StartedProbe(False)
Exemplo n.º 2
0
 def StopProbeResquest(self):
     # disable mode monitor card and stop attack
     self.ThreadProbe.stop()
     set_monitor_mode(self.get_placa.currentText()).setDisable()
     self.btn_stop.setEnabled(False)
     self.btn_scan.setEnabled(True)
     self.StartedProbe(False)
Exemplo n.º 3
0
 def StartProbeResquest(self):
     if self.get_placa.currentText() == '':
         return QMessageBox.information(self, 'Network Adapter', 'Network Adapter Not found try again.')
     self.btn_stop.setEnabled(True)
     self.btn_scan.setEnabled(False)
     set_monitor_mode(self.get_placa.currentText()).setEnable()
     self.ThreadProbe = ThreadProbeScan(str(self.get_placa.currentText()))
     self.connect(self.ThreadProbe,SIGNAL('Activated ( QString ) '), self.threadReceiveScan)
     self.ThreadProbe.setObjectName('::ThreadScanProbe')
     self.ThreadProbe.start()
     self.StartedProbe(True)
Exemplo n.º 4
0
 def StartProbeResquest(self):
     if self.get_placa.currentText() == '':
         return QMessageBox.information(
             self, 'Network Adapter',
             'Network Adapter Not found try again.')
     self.btn_stop.setEnabled(True)
     self.btn_scan.setEnabled(False)
     set_monitor_mode(self.get_placa.currentText()).setEnable()
     self.ThreadProbe = ThreadProbeScan(str(self.get_placa.currentText()))
     self.connect(self.ThreadProbe, SIGNAL('Activated ( QString ) '),
                  self.threadReceiveScan)
     self.ThreadProbe.setObjectName('::ThreadScanProbe')
     self.ThreadProbe.start()
     self.StartedProbe(True)
Exemplo n.º 5
0
    def stop_access_point(self):
        ''' stop all thread :Access point attack and restore all settings  '''
        if self.Apthreads['RogueAP'] == []: return
        print('-------------------------------')
        self.proxy.Stop()
        self.mitmhandler.Stop()
        self.dnsserver.Stop()
        self.dhcpcontrol.Stop()
        self.wireless.Stop()

        self.SessionConfig.DHCP.setEnabled(True)
        self.SessionConfig.DNSSettings.setEnabled(True)
        self.proxy.setEnabled(True)
        self.mitmhandler.setEnabled(True)

        self.FSettings.Settings.set_setting('accesspoint', 'statusAP', False)
        #TODO Fix this
        #self.FSettings.Settings.set_setting('accesspoint','bssid',str(self.EditBSSID.text()))
        self.SessionsAP[self.currentSessionID]['stoped'] = asctime()
        self.FSettings.Settings.set_setting('accesspoint', 'sessions',
                                            dumps(self.SessionsAP))

        try:
            for thread in self.Apthreads['RogueAP']:
                thread.stop()
            self.FSettings.Settings.set_setting('runningconfig', 'totalthread',
                                                0)
        except Exception:
            pass
        # remove iptables commands and stop dhcpd if pesist in process
        for kill in self.SettingsAP['kill']:
            exec_bash(kill)
        # stop time count

        self.Home.APStatus.stop_timer()

        set_monitor_mode(self.SettingsEnable['AP_iface']).setDisable()
        self.set_status_label_AP(False)
        self.progress.setValue(1)
        self.progress.change_color('')
        self.progress.setText('')
        self.connectedCount.setText('0')
        self.Apthreads['RogueAP'] = []
        self.APclients = {}
        self.btn_cancelar.setEnabled(False)
        self.btn_start_attack.setEnabled(True)
        self.progress.showProcessBar()
Exemplo n.º 6
0
    def closeEvent(self, event):
        ''' When the user clicks on the X button '''
        if self.UI.THReactor.isReactorRunning:
            self.UI.THReactor.stop()
        if self.UI.THReactor.isRunning():
            self.UI.THReactor.stop()

        # remove card apdater from network-manager conf
        if not self.FSettings.Settings.get_setting(
                'accesspoint', 'persistNetwokManager', format=bool):
            if self.networkcontrol != None:
                self.networkcontrol.remove_settingsNM()

        # check if any wireless card is enable as Monitor mode
        iwconfig = Popen(['iwconfig'], stdout=PIPE, shell=False, stderr=PIPE)
        for i in iwconfig.stdout.readlines():
            if search('Mode:Monitor', i):
                self.reply = QtGui.QMessageBox.question(
                    self, 'About Exit', 'Are you sure to quit?',
                    QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
                    QtGui.QMessageBox.No)
                if self.reply == QtGui.QMessageBox.Yes:
                    set_monitor_mode(i.split()[0]).setDisable()
                    return event.accept()
                return event.ignore()

        # check is Rouge AP is running
        if self.UI.Apthreads['RogueAP'] != []:
            self.reply = QtGui.QMessageBox.question(
                self, 'About Access Point',
                'Are you sure to stop all threads AP ?',
                QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
                QtGui.QMessageBox.No)
            if self.reply == QtGui.QMessageBox.Yes:
                print('killing all threads...')
                self.UI.stop_access_point()
                return event.accept()
            return event.ignore()
        return event.accept()