VB; Sending random ping
VB; Sending random ping
Does anyone have a code that sends out pings to random IP's until you tell it to stop?
IP Pinger
You could try this code
Its written in Python You could easily modify it to make a continious loop
or just edit the value in for i in range
Have Fun
Code: Select all
import random
import popen2
def newip():
ip = '.'.join([str(random.randint(0, 255)) for x in range(4)])
return ip
oldip = {}
for i in range(10):
ip = newip()
str(ip)
myopen = "ping " + ip
outfile, infile = popen2.popen2(myopen)
results = outfile.read()
outfile.close()
print 'results:\n========\n'
resultlist = results.split(':::')
for result in resultlist:
if result.strip():
print result
print '---------------\n'
if not oldip.has_key(ip):
oldip[ip] = 1
or just edit the value in for i in range
Have Fun