Exemplo n.º 1
0
 def msg_pushButton_4(self ):
     
     Ip_input = str(self.lineEdit_4.text())
     R = Check_ip(Ip_input)
     Src_ip = str(self.lineEdit_5.text())
     GateWay = str(self.lineEdit_6.text())
     
     if R:
         
         QMessageBox.information(None,"0xcc_"," Start Attacking..!",QMessageBox.__str__("_"))
         dest_IP = Ip_input
         dest_mac = "a"
         res = arp_backend.arp_resolve(dest_IP,Src_ip)
        
         if res:
             dest_mac = arp_backend.mac_straddr(res, 1, ":")
         else :
             QMessageBox.information(None,"0xcc_"," IP NOT FOUND!",QMessageBox.__str__("..."))
         
         Attack_thread1 = threading.Thread(target=arp_backend.StartAttack,args=(dest_IP,dest_mac,GateWay))
         Attack_thread2 = threading.Thread(target=arp_backend.StartAttack,args=(dest_IP,dest_mac,GateWay))
         """Start Attaka."""
         Attack_thread1.start()
         Attack_thread2.start()
         if arp_backend.M == False:
             QMessageBox.information(None,"0xcc_","Attaka Failed.Please install winpcap(in the package) and Run me with Administrator!",QMessageBox.__str__("..."))
Exemplo n.º 2
0
 def GetIpAndGateway(self):
     
     self.listWidget.clear()
         
     """Get 2 elem.""" 
     
     Ip_input = str(self.lineEdit_5.text())
     GateWay = str(self.lineEdit_6.text())
     Ip_CHECK = Check_ip(Ip_input)
     GateWay_CHECK = Check_ip(GateWay)
     #Get two Fundamental parameter.
     if Ip_CHECK and GateWay_CHECK :
         
         IP = Ip_input
         Gate_ = GateWay
         #Substitute with a process_bar.
         QMessageBox.information(None,"0xcc_"," Scan Started! Please Wait...",QMessageBox.__str__('^_^'))
         #Substitute with a process_bar. 
         
         def ProcessA(dest_ip,src_ip=IP,Gate=Gate_):
             res = arp_backend.arp_resolve(dest_ip, src_ip)
             #Host Online.
             if res:
                 mac = arp_backend.mac_straddr(res, 1, ":")
                 try :
                     hostname = arp_backend.socket.gethostbyaddr(dest_ip)
                     hostname=hostname[0]
                 except:
                     if dest_ip == Gate_:
                         hostname = "NetWork Router"
                     else:
                         hostname = "Android platform Or Family Router."
                 if mutex.acquire():
                     self.listWidget.addItem("Hostname:")
                     self.listWidget.addItem(hostname)
                     self.listWidget.addItem("IP:"+" "+dest_ip+"-- MAC:"+mac)
                     mutex.release()
         #QMessageBox.information(None,"0xcc_"," Launch Scan!",QMessageBox.__str__("_"))
       
         
         threadpool = []
         num = 0
         wait =0
         Scan_List = arp_backend.ip_process(str(IP)) 
         #20 Threads.
         for x in Scan_List:
             t = threading.Thread(target=ProcessA,args=(str(x),))
             threadpool.append(t)
         for th in threadpool:
             if wait > 8:
                 time.sleep(1)
                 wait = 0
             th.start()
             wait +=1
Exemplo n.º 3
0
def WrongA():
    reply = QMessageBox.information(None,"0xcc_","Illegal Ip!", QMessageBox.__str__("^"))