Esempio n. 1
0
 def get_Session_ID(self):
     ''' get key id for session AP '''
     session_id = Refactor.generateSessionID()
     while session_id in self.SessionsAP.keys():
         session_id = Refactor.generateSessionID()
     self.window_phishing.session = session_id
     return session_id
Esempio n. 2
0
 def working(self,ip,lista):
     with open(devnull, 'wb') as limbo:
         result=Popen(['ping', '-c', '1', '-n', '-W', '1', ip],
         stdout=limbo, stderr=limbo).wait()
         if not result:
             if Refactor.get_mac(ip) == None:
                 lista[ip] = ip + '|' + 'not found'
             else:
                 lista[ip] = ip + '|' + Refactor.get_mac(ip)
Esempio n. 3
0
 def working(self,ip,lista):
     with open(devnull, 'wb') as limbo:
         result=Popen(['ping', '-c', '1', '-n', '-W', '1', ip],
         stdout=limbo, stderr=limbo).wait()
         if not result:
             if Refactor.get_mac(ip) == None:
                 lista[ip] = ip + '|' + 'not found'
             else:
                 lista[ip] = ip + '|' + Refactor.get_mac(ip)
Esempio n. 4
0
 def run(self):
     if self.get_ifacesAllWireless():
         if self.ifaceAvaliable != []:
             for interface in self.ifaceAvaliable:
                 if not self.check_interfaceinNetWorkManager(interface):
                     Refactor.settingsNetworkManager(interface)
                     self.flag = 1
         if self.flag:
             Refactor.kill_procInterfaceBusy()
             Popen(['service', 'network-manager', 'restart'])
             return True
     return False
 def run(self):
     if self.get_ifacesAllWireless():
         if self.ifaceAvaliable != []:
             for interface in self.ifaceAvaliable:
                 if not self.check_interfaceinNetWorkManager(interface):
                     Refactor.settingsNetworkManager(interface)
                     self.flag = 1
         if self.flag:
             Refactor.kill_procInterfaceBusy()
             Popen(['service', 'network-manager', 'restart'])
             return True
     return False
Esempio n. 6
0
 def check_NetworkConnection(self):
     ''' update inferfaces '''
     self.btrn_find_Inet.setEnabled(False)
     interfaces = Refactor.get_interfaces()
     self.set_StatusConnected_Iface(False, 'checking...', check=True)
     QtCore.QTimer.singleShot(
         3000, lambda: self.set_backgroud_Network(interfaces))
Esempio n. 7
0
 def refrash_interface(self):
     self.ComboIface.clear()
     n = Refactor.get_interfaces()['all']
     for i,j in enumerate(n):
         if search('at',j) or search('wl',j):
             self.ComboIface.addItem(n[i])
             self.discoveryIface()
Esempio n. 8
0
 def __init__(self,parent=None,*args):
     super(PumpkinModule, self).__init__(parent)
     self.setWindowIcon(QIcon('icons/icon.ico'))
     self.module_network = Refactor
     self.configure      = frm_Settings()
     self.Ftemplates     = frm_PhishingManager()
     self.interfaces     = Refactor.get_interfaces()
Esempio n. 9
0
 def set_initials_configsGUI(self):
     ''' settings edits default and check tools '''
     self.get_interfaces = Refactor.get_interfaces()
     if  self.get_interfaces['activated'][0]:
         return self.set_StatusConnected_Iface(True,self.get_interfaces['activated'][0])
     self.InternetShareWiFi = False
     self.set_StatusConnected_Iface(False,'')
Esempio n. 10
0
 def refrash_interface(self):
     self.ComboIface.clear()
     n = Refactor.get_interfaces()['all']
     for i,j in enumerate(n):
         if search('at',j) or search('wl',j):
             self.ComboIface.addItem(n[i])
             self.discoveryIface()
Esempio n. 11
0
 def check_interfaceinNetWorkManager(self,interface):
     ''' check if interface is already in file config'''
     mac = Refactor.get_interface_mac(interface)
     if mac != None:
         if mac in open(self.mn_path,'r').read(): return True
         if interface in open(self.mn_path,'r').read(): return True
     return False
Esempio n. 12
0
 def check_interfaceinNetWorkManager(self, interface):
     ''' check if interface is already in file config'''
     mac = Refactor.get_interface_mac(interface)
     if mac != None:
         if mac in open(self.mn_path, 'r').read(): return True
         if interface in open(self.mn_path, 'r').read(): return True
     return False
Esempio n. 13
0
 def configure_network_AP(self):
     ''' configure interface and dhcpd for mount Access Point '''
     self.SettingsEnable['PortRedirect'] = self.FSettings.Settings.get_setting('settings','redirect_port')
     print('[*] Enable forwarding in iptables...')
     Refactor.set_ip_forward(1)
     # clean iptables settings
     for line in self.SettingsAP['kill']: exec_bash(line)
     # set interface using ifconfig
     for line in self.SettingsAP['interface']: exec_bash(line)
     # check if dhcp option is enabled.
     if self.FSettings.Settings.get_setting('accesspoint','dhcp_server',format=bool):
         with open(C.DHCPCONF_PATH,'w') as dhcp:
             for line in self.SettingsAP['dhcp-server']:dhcp.write(line)
             dhcp.close()
             if not path.isdir('/etc/dhcp/'): mkdir('/etc/dhcp')
             move(C.DHCPCONF_PATH, '/etc/dhcp/')
Esempio n. 14
0
 def GetloggerInjection(self,data):
     if Refactor.getSize('logs/AccessPoint/injectionPage.log') > 255790:
         with open('logs/AccessPoint/injectionPage.log','w') as bufferlog:
             bufferlog.write(''), bufferlog.close()
     if data not in self.urlinjected:
         self.log_inject.addItem(data)
         self.urlinjected.append(data)
     self.log_inject.scrollToBottom()
Esempio n. 15
0
 def GetloggerInjection(self, data):
     if Refactor.getSize('logs/AccessPoint/injectionPage.log') > 255790:
         with open('logs/AccessPoint/injectionPage.log', 'w') as bufferlog:
             bufferlog.write(''), bufferlog.close()
     if data not in self.urlinjected:
         self.log_inject.addItem(data)
         self.urlinjected.append(data)
     self.log_inject.scrollToBottom()
 def GetloggerInjection(self,data):
     ''' read load file and add in Qlistwidget '''
     if Refactor.getSize(C.LOG_SSLSTRIP) > 255790:
         with open(C.LOG_SSLSTRIP,'w') as bufferlog:
             bufferlog.write(''), bufferlog.close()
     if data not in self.urlinjected:
         self.log_inject.addItem(data)
         self.urlinjected.append(data)
     self.log_inject.scrollToBottom()
Esempio n. 17
0
 def clean_all_loggers(self):
     ''' delete all logger file in logs/ '''
     content = Refactor.exportHtml()
     resp = QtGui.QMessageBox.question(self, 'About Delete Logger',
         'do you want to delete logs?',QtGui.QMessageBox.Yes |
                                       QtGui.QMessageBox.No, QtGui.QMessageBox.No)
     if resp == QtGui.QMessageBox.Yes:
         del_item_folder(['logs/Caplog/*','logs/ImagesCap/*'])
         for keyFile in content['Files']:
             with open(keyFile,'w') as f:
                 f.write(''),f.close()
         self.FSettings.Settings.set_setting('accesspoint','sessions',dumps({}))
         QtGui.QMessageBox.information(self,'Logger','All Looger::Output has been Removed...')
     self.deleteObject(content)
     self.deleteObject(resp)
Esempio n. 18
0
 def __init__(self,parent = None):
     super(CLI_NetworkManager, self).__init__()
     self.interfaces = Refactor.get_interfaces()
     self.mn_path = C.NETWORKMANAGER
     self.ifaceAvaliable = []
     self.flag = 0
Esempio n. 19
0
 def __init__(self, parent=None):
     super(CLI_NetworkManager, self).__init__()
     self.interfaces = Refactor.get_interfaces()
     self.mn_path = C.NETWORKMANAGER
     self.ifaceAvaliable = []
     self.flag = 0
Esempio n. 20
0
 def discoveryIface(self):
     iface = str(self.ComboIface.currentText())
     ip = Refactor.get_Ipaddr(iface)
     self.txt_IP.setText(ip)
Esempio n. 21
0
 def discoveryIface(self):
     iface = str(self.ComboIface.currentText())
     ip = Refactor.get_Ipaddr(iface)
     self.txt_IP.setText(ip)
Esempio n. 22
0
 def remove_settingsNM(self):
     ''' remove all wireless from Network-Manager.conf '''
     if self.get_ifacesAllWireless():
         for interface in self.ifaceAvaliable:
             Refactor.settingsNetworkManager(interface,Remove=True)
Esempio n. 23
0
 def __init__(self, parent=None):
     super(CLI_NetworkManager, self).__init__()
     self.interfaces = Refactor.get_interfaces()
     self.mn_path = '/etc/NetworkManager/NetworkManager.conf'
     self.ifaceAvaliable = []
     self.flag = 0
Esempio n. 24
0
 def remove_settingsNM(self):
     ''' remove all wireless from Network-Manager.conf '''
     if self.get_ifacesAllWireless():
         for interface in self.ifaceAvaliable:
             Refactor.settingsNetworkManager(interface, Remove=True)