PHPmyadmin批量监测

2019年10月11日17:25:24 评论 95
#!coding:utf-8
import requests,re,os
from sys import argv

print '''
 [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%| $a,        |%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
 [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%| $S`?a,     |%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
 [%%%%%%%%%%%%%%%%%%%%__%%%%%%%%%%|       `?a, |%%%%%%%%__%%%%%%%%%__%%__ %%%%]
 [% .--------..-----.|  |_ .---.-.|       .,a$%|.-----.|  |.-----.|__||  |_ %%]
 [% |  ^   ^    >>   _  ,             ,aS$""`  ||  _    _    << ^        ^ |%%]
 [% |__|__|__||_____||____||___._||%$P"`       ||   __||__||_____||__||____|%%]
 [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%| `"a,       ||__|%%%%%%%%%%%%%%%%%%%%%%%%%%]
 [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|____`"a,$$__|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
 [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        `"$   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]
 [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]


                                 Author By Oniont
'''

try:
    IP = argv[1] 
    IPbegin = IP.split('-')[0] 
    IPend = IP.split('-')[1]

    IP_b1 = IPbegin.split('.')[0]
    IP_b2 = IPbegin.split('.')[1]
    IP_b3 = IPbegin.split('.')[2]
    IP_b4 = IPbegin.split('.')[3]

    IP_e1 = IPend.split('.')[0]
    IP_e2 = IPend.split('.')[1]
    IP_e3 = IPend.split('.')[2]
    IP_e4 = IPend.split('.')[3]
except:
    print u'请输入正确的IP范围格式,eg: 192.168.1.1-192.168.1.254'

IP_over = ''
IP_range = ''
IP_DIC = []

if IP_b1 == IP_e1:
    if IP_b2 == IP_e2:
        if IP_b3 == IP_e3:
            if IP_b4 == IP_e4:
                IP_over = IPbegin
            else:
                for i in range(1,255):
                    i = str(i)
                    print type(i)
                    IP_3 = IP_b1 + '.' + IP_b2 + '.' + IP_b3 + '.'+ i
                    IP_DIC.append(IP_3)
        else:
            for i in range(1,255):
                i = str(i)
                IP_2_3 = IP_b1 + '.' + IP_b2 + '.' + i
                for n in range(1,255):
                    n = str(n)
                    IP_2 = IP_2_3 + '.' + n
                    IP_DIC.append(IP_2)
    else:
        for i in range(1,255):
            i = str(i)
            IP_1_2 = IP_b1 + '.' + i
            for n in range(1,255):
                n = str(n)
                IP_1_2_3 = IP_1_2 + '.' + n
                for m in range(1,255):
                    m = str(m)
                    IP_1 = IP_1_2_3  + '.' + m
                    IP_DIC.append(IP_1)
else:
    for i in range(1,255):
        i = str(i)
        IP_0_1 = i
        for n in range(1,255):
            n = str(n)
            IP_0_2 = IP_0_1 + '.' + n
            for m in range(1,255):
                m = str(m)
                IP_0_3 = IP_0_2 + '.' + m
                for v in range(1.255):
                    v = str(v)
                    IP_0 = IP_0_3 + '.' + v
                    IP_DIC.append(IP_0)


print IP_DIC

http://www.oniont.cn/index.php/archives/232.html

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: