./misc/ipgen.py

0.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
#!/usr/bin/env python
#Random IP generater.
 
#whoami project
 
#http://darkc0de.com
#d3hydr8[at]gmail[dot]com
 
import sys, random, re
 
def randip():
 
	A = random.randrange(255) + 1
	B = random.randrange(255) + 1
	C = random.randrange(255) + 1
	D = random.randrange(255) + 1
	ip = "%d.%d.%d.%d" % (A,B,C,D)
	return ip
 
 
print "\n   d3hydr8[at]gmail[dot]com IPgen v1.0"
print "----------------------------------------\n"
if len(sys.argv) < 2:
	print "Usage: ./ipgen.py <how many?>\n"
	sys.exit(1)
 
ips = []
for x in xrange(int(sys.argv[1])):
	ips.append(randip())
 
ips = str(ips)
 
ips = ips[1:-1].replace("'","")
print re.sub("\s","",ips)

Back