[Tutor] need help with socket / fuzzer not sure the while loop condition is wrong
alan.gauld at yahoo.co.uk
Thu Jul 21 14:04:35 EDT 2016
On 21/07/16 12:50, la Y wrote:
> need help with socket / fuzzer
UI've no idea what fuzzer means but...
> not sure the while loop condition is wrong
> def fuzzer():
> #user attack coordinates and junk
> currentEta = datetime.datetime.now()
> targetIP = raw_input("hello what is the target IP destinaition address: ")
> socketPort = int(raw_input("what port number : "))
> while ( socketPort < 4 ) and (socketPort <= 65535):
> socketPort = int(socketPort)
This makes no sense at all.
The socketPort is already an int because you make it so
on the raw_input line.
If it is <4 it will also be less than 65535 so the "and"
test is superfluous.
And if it is <4 the while loop will run forever because
you never change the value of socketPort.
x = int(n)
int(x) == x
is always true
I've no idea what the loop is intended to do so I can't
comment on whether you need to just delete it or whether
you need to modify it somehow.
Author of the Learn to Program web site
Follow my photo-blog on Flickr at:
More information about the Tutor