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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -