forked from ym2011/PenetrationTestingScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathipreverse.py
37 lines (31 loc) · 1.27 KB
/
ipreverse.py
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
35
36
37
#!/usr/bin/python
#-*- coding:utf-8 -*-
########################################################################################################
#ipreverse.py - v0.0.1 20160402
########################################################################################################
#this is a simply methods to produce ip list with python
#maybe I would add more functions into in it
########################################################################################################
###
########################################################################################################
#python ipreverse.py >> ips2.txt
print """
this script wouldn products a series of ip depending on your choices
press ' Ctrl + C ' to stop the process
如果想把 结果输出到文件中,可以使用如下命令:
python ipreverse.py >> ips.txt
"""
#############################################################################
import sys
#origin = sys.stdout
#ips = open('ips.txt','w+')
#sys.stdout = ips
for a in range (0,255):
for b in range (0,255):
for c in range (0,255):
for d in range (0,255):
print str(a) +"." + str(b) + "." + str(c) + "." + str(d)
#sys.stdout = origin
#ips.close()
if __name__ == "__main__":
main()