├── UA_Pool.py ├── awvs_proxy.py ├── batchCleanSubdomain.bat ├── batchStatusCodeClean.bat ├── images ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg └── 7.jpg ├── lijiejie批量.bat ├── readme.md ├── statusCodeClean.py ├── subdomainClean.py ├── webhookdemo.py ├── xray sql.txt ├── xray_deploy_in_onekey.py └── 批量处理子域名文件(10k).bat /awvs_proxy.py: -------------------------------------------------------------------------------- 1 | __author__ = 'leezp' 2 | # xray 一键分发awvs任务 3 | # 191130 4 | # -*- coding:utf-8 -*- 5 | import requests 6 | import json 7 | import urllib3 8 | import time 9 | import queue 10 | 11 | urllib3.disable_warnings() 12 | 13 | 14 | class define: 15 | num = 1 16 | GREEN = "\033[32m" 17 | RED = "\033[0;31m" 18 | BLUE = "\033[94m" 19 | ORANGE = "\033[33m" 20 | host = "https://127.0.0.1:3443/" # 端口后面一定要加/ 21 | api_key = "1986ad8c0a5b3df4d7028d5f3c06e936c6ffee1016f8148fc9415805468875fc0" 22 | api_header = {'X-Auth': api_key, 'content-type': 'application/json;charset=UTF-8'} 23 | awvs_scan_rule = { 24 | "full": "11111111-1111-1111-1111-111111111111", 25 | "highrisk": "11111111-1111-1111-1111-111111111112", 26 | "XSS": "11111111-1111-1111-1111-111111111116", 27 | "SQL": "11111111-1111-1111-1111-111111111113", 28 | "Weakpass": "11111111-1111-1111-1111-111111111115", 29 | "crawlonly": "11111111-1111-1111-1111-111111111117" 30 | } 31 | 32 | 33 | def add(awvshost, url): 34 | # 添加任务 35 | data = {"address": url, "description": url, "criticality": "10"} 36 | try: 37 | response = requests.post(awvshost + "api/v1/targets", data=json.dumps(data), headers=define.api_header, 38 | timeout=30, verify=False) 39 | result = json.loads(response.content) 40 | return result['target_id'] 41 | except Exception as e: 42 | print(str(e)) 43 | return 44 | 45 | 46 | def cool(awvshost, addr, port, url): 47 | try: 48 | target_id = add(awvshost, url) 49 | except: 50 | print(url) 51 | pass 52 | try: 53 | data = {"proxy": {"enabled": True, "address": addr, "protocol": "http", "port": port}} 54 | response = requests.patch(awvshost + "api/v1/targets/" + target_id + "/configuration", verify=False, 55 | data=json.dumps(data), headers=define.api_header) 56 | ''' 57 | resp = requests.get(awvshost + "api/v1/targets/" + target_id + "/configuration", data=json.dumps(data), 58 | headers=define.api_header) 59 | print(resp.text) 60 | ''' 61 | data = {'target_id': target_id, 'profile_id': define.awvs_scan_rule['crawlonly'], 62 | 'schedule': {'disable': False, 'start_date': None, 'time_sensitive': False}} 63 | except Exception as e: 64 | print(url) 65 | pass 66 | try: 67 | r = requests.post(url=awvshost + 'api/v1/scans', timeout=10, verify=False, headers=define.api_header, 68 | data=json.dumps(data)) 69 | if r.status_code == 201: 70 | print(define.BLUE + '[-] OK, 扫描任务已经启动 当前扫描第' + str(define.num) + '个网站:%s' % url) 71 | define.num += 1 72 | except Exception as e: 73 | print(e) 74 | print(url) 75 | pass 76 | 77 | 78 | def singlevps(): 79 | s = open('url.txt', 'r') 80 | k = 0 81 | j = 0 82 | for i in s.readlines(): 83 | j += 1 84 | if j < 1: 85 | continue 86 | if k > 123: 87 | break 88 | else: 89 | cool(define.host, "127.1.1.1", 22, i.strip()) 90 | k += 1 91 | time.sleep(60) 92 | 93 | 94 | def multivps(): 95 | s = open('url.txt', 'r') 96 | 97 | q = queue.Queue() 98 | host = { 99 | 1: '172.16.1.1:22,root,XXX,7776' 100 | , 2: '172.16.1.2:22,root,XXX,7775' 101 | , 3: '172.16.1.3:22,root,XXX,7776' 102 | , 4: '172.16.1.4:22,root,XXX,7773' 103 | , 5: '172.16.1.5:22,root,XXX,7771' 104 | , 6: '172.16.1.6:22,root,XXX,7778' 105 | , 7: '172.16.1.7:22,root,XXX,7772' 106 | , 8: '172.16.1.8:22,root,XXX,7779' 107 | , 9: '172.16.1.9:22,root,XXX,7770' 108 | , 10: '172.16.1.10:22,root,XXX,7774' 109 | , 11: '172.16.1.11:61001,root,XXX,7773' 110 | , 12: '172.16.1.12:61001,root,XXX,7774' 111 | } 112 | 113 | for i in s.readlines(): 114 | # 由 lijiejie子域名 扫描完 分割 , www.baidu.com cdn 115 | q.put(i.split(' ')[0].strip()) 116 | while not q.empty(): 117 | try: 118 | for k in range(len(host)): 119 | ip = host.get(k + 1).split(':')[0].strip() 120 | port = host.get(k + 1).split(',')[-1].strip() 121 | if not q.empty(): 122 | cool(define.host, ip, port, q.get()) 123 | else: 124 | print('运行结束') 125 | break 126 | time.sleep(10) 127 | except: 128 | print('运行结束') 129 | 130 | 131 | if __name__ == '__main__': 132 | # singlevps() 133 | multivps() 134 | -------------------------------------------------------------------------------- /batchCleanSubdomain.bat: -------------------------------------------------------------------------------- 1 | :: 批量执行子域名去重脚本 2 | @echo off 3 | for %%i in (*1_full.txt) do ( 4 | python36 subdomainClean.py -f %%i 5 | ) 6 | :: python36 subdomain.py -f %%i 7 | :: python 文件名不可是中文 8 | :: do () ,do后面必须有一个空格。 9 | -------------------------------------------------------------------------------- /batchStatusCodeClean.bat: -------------------------------------------------------------------------------- 1 | :: 批量执行状态码清洗 2 | @echo off 3 | for %%i in (*full.txt) do ( 4 | python36 statusCodeClean.py -f %%i 5 | ) 6 | :: python36 subdomain.py -f %%i 7 | :: python 文件名不可是中文 8 | :: do () ,do后面必须有一个空格。 9 | -------------------------------------------------------------------------------- /images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leezp/SubdomainWash/5000f0878088c5d4786559e8313748a7ed8148d0/images/1.jpg -------------------------------------------------------------------------------- /images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leezp/SubdomainWash/5000f0878088c5d4786559e8313748a7ed8148d0/images/2.jpg -------------------------------------------------------------------------------- /images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leezp/SubdomainWash/5000f0878088c5d4786559e8313748a7ed8148d0/images/3.jpg -------------------------------------------------------------------------------- /images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leezp/SubdomainWash/5000f0878088c5d4786559e8313748a7ed8148d0/images/4.jpg -------------------------------------------------------------------------------- /images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leezp/SubdomainWash/5000f0878088c5d4786559e8313748a7ed8148d0/images/5.jpg -------------------------------------------------------------------------------- /images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leezp/SubdomainWash/5000f0878088c5d4786559e8313748a7ed8148d0/images/6.jpg -------------------------------------------------------------------------------- /images/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leezp/SubdomainWash/5000f0878088c5d4786559e8313748a7ed8148d0/images/7.jpg -------------------------------------------------------------------------------- /lijiejie批量.bat: -------------------------------------------------------------------------------- 1 | :: lijiejie 批量 2 | 3 | setlocal enabledelayedexpansion 4 | for /f %%i in (url.txt) do ( 5 | python subDomainsBrute.py %%i --full 6 | ) -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ## Date 2 | 3 | 2019.12 4 | 5 | 6 | ## 设计思路 7 | 8 | 子域名获取->页面访问去重->子域名任务分发到awvs,并自动部署不同代理(代理为部署了多台xray的内网服务器)->xray分布式跑结果->上传检测成功至云端数据库,并发送wx通知。 9 | 10 | 11 | ## 具体实现 12 | 13 | ### 数据预处理 14 | 15 | 1.子域名搜集 16 | 17 | 这里我使用 [lijiejie 子域名采集](https://github.com/lijiejie/subDomainsBrute) 18 | 19 | 2.批量扫描域名获取子域名 20 | 21 | 将```lijiejie批量.bat``` 放在```lijijie```工具目录下,运行```lijiejie批量.bat```文件。 22 | 23 | ![](images/1.jpg) 24 | 25 | 3.批量处理子域名 26 | 27 | 运行```批量处理子域名文件(10k).bat``` 28 | 29 | 此步骤作用为:扫描出来的子域名文件大小<10k的复制到一个txt中(a_output.txt)。文件大小>=10k 的 剪切到 当前目录 “1” 文件夹下,下一步对这些大文件进行清洗。 30 | 31 | ![](images/2.jpg) 32 | 33 | 34 | 4.子域名清洗 35 | 36 | 1). 去掉无法访问的子域名, 37 | 38 | 简单写了一些状态码,排除掉: 39 | 40 | ![](images/3.jpg) 41 | 42 | python3 statusCodeClean.py -f url_full.txt 43 | 44 | 转化成bat文件。 ```batchStatusCodeClean.bat``` 批量执行状态码清洗 45 | 46 | 2). 去重复。比如淘宝的资产,去掉一些重复的店铺和由于高并发访问导致的验证码页面,这些页面是一个模板,只需要扫描一个就行了。 47 | 48 | ![](images/4.jpg) 49 | 50 | python3 subdomainClean.py -f url_1_full.txt 51 | 52 | 转化成bat文件。 ```batchCleanSubdomain.bat``` 批量执行子域名清洗 53 | 54 | 55 | ### 数据库搭建 56 | 57 | 4.存储服务器搭建数据库 58 | 59 | 简单设计了一下要存储的字段 60 | 61 | ![](images/5.jpg) 62 | 63 | 数据库创建语句见 xray sql.txt 64 | 65 | 5.开启 webhook 66 | 67 | ![](images/6.jpg) 68 | 69 | ### 部署扫描器 70 | 71 | 6.采用批量连接ssh(我这里部署到10台本地服务器上),批量上传扫描器和配置文件,批量启动扫描器。 72 | 73 | xray_deploy_in_onekey.py 74 | 75 | 7.使用 awvs 12 用api调用,找到api并复制。 76 | 77 | ![](images/7.jpg) 78 | 79 | 用上面的脚本模拟给awvs配置xray代理。 80 | 81 | 8.任务分发 82 | 83 | 给前面部署的扫描器分发任务,每10秒awvs 给每个扫描器分配一个任务。 84 | 85 | awvs_proxy.py 86 | 87 | ### 躺着收割 88 | 89 | 躺着让服务器自己跑就完事了。 90 | 91 | ### 后记 92 | 93 | 因为没时间和懒又追求效率,所以想把自动化做更好。 94 | 95 | 做完以后发现自己还是很懒,每次过滤子域名需要打开几个url看看页面区别,提取xpath,懒得弄。 96 | 97 | 还是把代码贡献出来。怎么说也费心调试了几个晚上。 98 | 99 | 最后,本人水平有限,欢迎探讨。 -------------------------------------------------------------------------------- /statusCodeClean.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | __author__ = 'leezp' 3 | __date__ = 20191231 4 | import asyncio 5 | import aiohttp 6 | import aiomultiprocess 7 | import aiofiles 8 | import queue 9 | import datetime 10 | import random 11 | from lxml import etree 12 | import urllib3 13 | import UA_Pool as UApool 14 | import re 15 | import argparse 16 | 17 | def parse_args(): 18 | parse = argparse.ArgumentParser(usage='python36 %(prog)s -f url_full.txt') 19 | parse.add_argument('-f', dest='input_file', type=str, default='url_full.txt', help='default is url_full.txt') 20 | arg = parse.parse_args() 21 | return arg.input_file 22 | 23 | asyncio_Semaphore = 500 # 设置最大并发数为500 , linux可设置1000,效率翻倍 24 | input_file, dic_key = parse_args() 25 | name = input_file.split('_')[0].strip() 26 | output_file = name + '_1_full.txt' 27 | q = queue.Queue() 28 | file = open(input_file, encoding='utf-8') 29 | for x in file.readlines(): 30 | url = 'http://' + x.split(' ')[0].strip() 31 | # url = x.split(' ')[0].strip() 32 | q.put(url) 33 | 34 | 35 | urllib3.disable_warnings() 36 | 37 | async def fetch(url): 38 | sem = asyncio.Semaphore(asyncio_Semaphore) 39 | async with sem: 40 | # 最大访问数 41 | async with aiohttp.ClientSession() as session: 42 | try: 43 | async with session.head(url, timeout=5) as response: 44 | status = response.status 45 | if status == 404 or status == 500 or status == 504 or status == 503 or status == 512 or status == 608 or status == 403: 46 | return 47 | async with aiofiles.open(output_file, 'a', encoding='utf-8') as f: 48 | await f.write("{} {}".format(url, status) + '\n') 49 | await f.close() 50 | except Exception as e: 51 | print(e) 52 | pass 53 | finally: 54 | print('test speed') 55 | 56 | 57 | async def main(): 58 | tasks = [] 59 | while not q.empty(): 60 | url = q.get() 61 | tasks.append(url) 62 | async with aiomultiprocess.Pool() as pool: 63 | result = await pool.map(fetch, tasks) 64 | # print(result) 65 | 66 | 67 | # asyncio内部用到了select,而select就是系统打开文件数是有限度的,这个其实是操作系统的限制,linux打开文件的最大数默认是1024,windows默认是509,超过了这个值,程序就开始报错 68 | if __name__ == '__main__': 69 | start_time = datetime.datetime.now() 70 | print(start_time) 71 | # event_loop事件循环:程序开启一个无限的循环,当把一些函数注册到事件循环上时,满足事件发生条件即调用相应的函数。 72 | loop = asyncio.get_event_loop() 73 | loop.run_until_complete(main()) 74 | end_time = datetime.datetime.now() 75 | print('消耗时间:{}'.format(end_time - start_time)) 76 | -------------------------------------------------------------------------------- /subdomainClean.py: -------------------------------------------------------------------------------- 1 | # -*- coding:utf-8 -*- 2 | __author__ = 'leezp' 3 | __date__ = 20191231 4 | import asyncio 5 | import aiohttp 6 | import aiomultiprocess 7 | import aiofiles 8 | import queue 9 | import datetime 10 | import random 11 | from lxml import etree 12 | import urllib3 13 | import UA_Pool as UApool 14 | import re 15 | import argparse 16 | 17 | urllib3.disable_warnings() 18 | 19 | class Gun(): 20 | def __init__(self): 21 | self.dic = { 22 | "None": [ 23 | ], 24 | "taobao": [ 25 | ('//*[@id="error-notice"]/div[2]/div[1] :) 没有找到相应的店铺信息', 26 | '//*[@id="error-notice"]/div[2]/div[3]/ol/li[4] :) 五秒后跳转至'), 27 | '/html/body/div/div/p[2] :) 很抱歉', # !暂时无法处理您的请求, 28 | '/html/body/div/div/p[2] :) 亲,慢慢来,请先坐下来喝口水!', 29 | '//*[@id="err"]/div[1]/p[1] :) 亲,小二正忙,滑动一下马上回来', 30 | '//*[@id="dead-page"]/header/div/div/div[2]/p :) 亲,这是个机器人猖狂的时代,请进行验证证明咱是正常人~', 31 | '//*[@id="dead-page"]/header/div/div/div[2]/div[2]/p[1] :) 抱歉', # 很抱歉,现在暂时无法处理您的请求 32 | '//*[@id="J_4938560545"]/div/div[1]/h2 :) 很抱歉,您查看的页面找不到了!', 33 | '//*[@id="err"]/div[1]/p :) 抱歉!', # 页面无法访问…… 34 | '//*[@id="content"]/div[1]/div/div/div[2]/div[1]/h3/em[2] :) 抱歉,您要访问的页面不存在', 35 | '//*[@id="App"]/div/div/div/div/div[2]/div[2] :) 内网访问受限,请先登录阿里郎连接内网后再试', 36 | '/html/body/div[5]/h4 :) 亲,店铺不存在哟!', #亲,店铺不存在哟!输入的店铺地址不正确或店铺已经关闭。 37 | '/html/body/div[2]/div/dl/dt/p :) 当前页面访问人数过多' 38 | ] 39 | } 40 | self.asyncio_Semaphore = 500 # 设置最大并发数为500 , linux可设置1000,效率翻倍 41 | self.title_regex = re.compile(r'([\s\S]*?)') 42 | self.zh_regex = re.compile(r'[\u4e00-\u9fa5]+') 43 | 44 | 45 | def parse_args(): 46 | parse = argparse.ArgumentParser(usage='python36 %(prog)s -f targetUrl_full.txt') 47 | parse.add_argument('-f', dest='input_file', type=str, default='url_full.txt', help='default is url_full.txt') 48 | arg = parse.parse_args() 49 | return arg.input_file 50 | 51 | 52 | # input_file = 'alisports.com_1_full.txt' 53 | input_file = parse_args() 54 | name = input_file.split('_')[0].strip() 55 | switch = False 56 | for key, value in Gun().dic.items(): 57 | if key == name: 58 | dic_key = name 59 | switch = True 60 | break 61 | if switch == False: 62 | dic_key = "None" 63 | output_file = name + '_out.txt' 64 | List = Gun().dic["None"] 65 | output_file = name + '_out.txt' 66 | 67 | q = queue.Queue() 68 | file = open(input_file, encoding='utf-8') 69 | for x in file.readlines(): 70 | #url = 'http://' + x.split(' ')[0].strip() 71 | url = x.split(' ')[0].strip() 72 | q.put(url) 73 | 74 | 75 | # 淘宝 约124 次出现验证码 76 | async def fetch(url): 77 | sem = asyncio.Semaphore(Gun().asyncio_Semaphore) 78 | async with sem: 79 | # 最大访问数 80 | async with aiohttp.ClientSession() as session: 81 | try: 82 | # proxy="http://ip:port" 83 | async with session.get(url, headers={'User-Agent': random.choice(UApool.data)}, 84 | verify_ssl=False, 85 | timeout=3) as resp: 86 | # If encoding is None content encoding is autocalculated using Content-Type HTTP header and chardet tool if the header is not provided by server. 87 | # text=await resp.text(encoding=None, errors='ignore') 等价于 content = await resp.read() code=chardet.detect(content)['encoding'] text=await resp.text(encoding=code, errors='ignore') 88 | status = resp.status 89 | text = await resp.text(encoding=None, errors='ignore') 90 | if Gun().title_regex.search(text) and Gun().title_regex.search(text).group(1): 91 | s = Gun().title_regex.search(text).group(1).strip() 92 | if ( 93 | u'旗舰店' in s and u'天猫' in s) or u'理想生活上天猫' in s or u'现在暂时无法处理您的请求' in s or \ 94 | u'大麦' in s or u'全球演出赛事官方购票平台' or u'亲,访问受限了' in s or \ 95 | 'security-X5' in s or 'dopa.com' in s or '米聊' in s or u'官方旗舰店' in s: 96 | return 97 | html = etree.HTML(text) 98 | xp = {} 99 | for i in range(len(List)): 100 | if type(List[i]).__name__ == "tuple": 101 | xp[str(i)] = html.xpath(List[i][0].split(':)')[0].strip()) 102 | xp["100"] = html.xpath(List[i][1].split(':)')[0].strip()) 103 | else: 104 | xp[str(i)] = html.xpath(List[i].split(':)')[0].strip()) 105 | for i in range(len(List)): 106 | if type(List[i]).__name__ == "tuple": 107 | if len(xp[str(i)]) > 0 and len(xp[str("100")]) > 0: 108 | if xp[str(i)][0].text.strip() == List[i][0].split(':)')[-1].strip() and xp[ 109 | "100"][0].text.strip() == List[i][1].split(':)')[-1].strip(): 110 | return 111 | elif len(xp[str(i)]) > 0 and xp[str(i)][0].text: 112 | if List[i].split(':)')[-1].strip() in xp[str(i)][0].text.strip(): 113 | return 114 | async with aiofiles.open(output_file, 'a', encoding='utf-8') as f: 115 | # await f.write("{} {} {}".format(url, status, text) + '\n') 116 | await f.write("{} {}".format(url, status) + '\n') 117 | await f.close() 118 | except Exception as e: 119 | print(e) 120 | pass 121 | finally: 122 | print('test speed') 123 | 124 | 125 | async def main(): 126 | tasks = [] 127 | while not q.empty(): 128 | url = q.get() 129 | tasks.append(url) 130 | async with aiomultiprocess.Pool() as pool: 131 | result = await pool.map(fetch, tasks) 132 | # print(result) 133 | 134 | 135 | if __name__ == '__main__': 136 | start_time = datetime.datetime.now() 137 | print(start_time) 138 | # event_loop事件循环:程序开启一个无限的循环,当把一些函数注册到事件循环上时,满足事件发生条件即调用相应的函数。 139 | loop = asyncio.get_event_loop() 140 | loop.run_until_complete(main()) 141 | end_time = datetime.datetime.now() 142 | print('消耗时间:{}'.format(end_time - start_time)) 143 | -------------------------------------------------------------------------------- /webhookdemo.py: -------------------------------------------------------------------------------- 1 | __author__ = 'leezp' 2 | # encoding=utf-8 3 | from flask import Flask, request # pip3 install Flask 4 | import requests 5 | import datetime 6 | import logging 7 | import pymysql 8 | 9 | # http://testphp.vulnweb.com/ 10 | # https://sc.ftqq.com/api.send?text=~ 11 | app = Flask(__name__) 12 | 13 | 14 | def push_ftqq(content): 15 | resp = requests.post("https://sc.ftqq.com/XXX.send", 16 | data={"text": "xray vuln alarm", "desp": content}) 17 | if resp.json()["errno"] != 0: 18 | raise ValueError("push ftqq failed, %s" % resp.text) 19 | 20 | 21 | def connect_db(): 22 | conn = pymysql.connect(host="localhost", port=3306, user="XXX", password="XXX", database="vulnerable", 23 | charset="utf8") 24 | return conn 25 | 26 | 27 | @app.route('/webhook', methods=['POST']) 28 | def xray_webhook(): 29 | # 当有数据时再判断 30 | if request: 31 | vuln = request.json 32 | print(vuln) 33 | ''' 34 | {'create_time': 1575984761043, 'detail': {'filename': '/phpinfo.php', 'host': 'localhost', 'param': {}, 'payload': '', 'port': 808, 'request': 'GET /phpinfo.php HTTP/1.1\r\nHost: localhost:808\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169\r\nContent-Type: text/plain\r\nCookie: key=value\r\nAccept-Encoding: gzip\r\n\r\n', 'response': 'HTTP/1.1 200 OK\r\nContent-Type: text/html\r\nDate: Tue, 10 Dec 2019 13:32:41 GMT\r\nServer: Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9\r\nX-Powered-By: PHP/5.4.45\r\n\r\n\n\n\nphpinfo()\n
\n\n\n
\nPHP Logo

PHP Version 5.4.45

\n

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
System Windows NT LEE-PC 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586
Build Date Sep 2 2015 23:45:20
Compiler MSVC9 (Visual C++ 2008)
Architecture x86
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\\php-sdk\\oracle\\instantclient10\\sdk,shared" "--with-oci8=C:\\php-sdk\\oracle\\instantclient10\\sdk,shared" "--with-oci8-11g=C:\\php-sdk\\oracle\\instantclient11\\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path C:\\Windows
Loaded Configuration File E:\\software\\phpstudy\\php\\php-5.4.45-nts\\php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20100412
PHP Extension 20100525
Zend Extension 220100525
Zend Extension Build API220100525,NTS,VC9
PHP Extension Build API20100525,NTS,VC9
Debug Build no
Thread Safety disabled
Zend Signal Handling disabled
Zend Memory Manager enabled
Zend Multibyte Support provided by mbstring
IPv6 Support enabled
DTrace Support disabled
Registered PHP Streamsphp, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, phar
Registered Stream Socket Transportstcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filtersconvert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.*

\n\n\n
\nZend logo\nThis program makes use of the Zend Scripting Language Engine:
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

\n
\n

PHP Credits

\n
\n

Configuration

\n

bcmath

\n\n\n
BCMath support enabled

\n\n\n\n
DirectiveLocal ValueMaster Value
bcmath.scale00

\n

bz2

\n\n\n\n\n\n
BZip2 Support Enabled
Stream Wrapper support compress.bzip2://
Stream Filter support bzip2.decompress, bzip2.compress
BZip2 Version 1.0.6, 6-Sept-2010

\n

calendar

\n\n\n
Calendar support enabled

\n

cgi-fcgi

\n\n\n\n\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
cgi.check_shebang_line11
cgi.discard_path00
cgi.fix_pathinfo11
cgi.force_redirect00
cgi.nph00
cgi.redirect_status_envno valueno value
cgi.rfc2616_headers00
fastcgi.impersonate11
fastcgi.logging11

\n

Core

\n\n\n
PHP Version 5.4.45

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
allow_url_fopenOnOn
allow_url_includeOnOn
always_populate_raw_post_dataOffOff
arg_separator.input&&
arg_separator.output&&
asp_tagsOffOff
auto_append_fileno valueno value
auto_globals_jitOnOn
auto_prepend_fileno valueno value
browscapno valueno value
default_charsetno valueno value
default_mimetypetext/htmltext/html
disable_classesno valueno value
disable_functionsno valueno value
display_errorsOnOn
display_startup_errorsOnOn
doc_rootno valueno value
docref_extno valueno value
docref_rootno valueno value
enable_dlOnOn
enable_post_data_readingOnOn
error_append_stringno valueno value
error_logno valueno value
error_prepend_stringno valueno value
error_reporting3276732767
exit_on_timeoutOffOff
expose_phpOnOn
extension_dirE:\\software\\phpstudy\\php\\php-5.4.45-nts\\extE:\\software\\phpstudy\\php\\php-5.4.45-nts\\ext
file_uploadsOnOn
highlight.comment#FF8000#FF8000
highlight.default#0000BB#0000BB
highlight.html#000000#000000
highlight.keyword#007700#007700
highlight.string#DD0000#DD0000
html_errorsOnOn
ignore_repeated_errorsOffOff
ignore_repeated_sourceOffOff
ignore_user_abortOffOff
implicit_flushOffOff
include_path.;C:\\php\\pear.;C:\\php\\pear
log_errorsOnOn
log_errors_max_len10241024
mail.add_x_headerOnOn
mail.force_extra_parametersno valueno value
mail.logno valueno value
max_execution_time3030
max_file_uploads2020
max_input_nesting_level6464
max_input_time6060
max_input_vars10001000
memory_limit128M128M
open_basedirno valueno value
output_buffering40964096
output_handlerno valueno value
post_max_size8M8M
precision1414
realpath_cache_size16K16K
realpath_cache_ttl120120
register_argc_argvOffOff
report_memleaksOnOn
report_zend_debugOnOn
request_orderCGPCGP
sendmail_fromno valueno value
sendmail_pathno valueno value
serialize_precision1717
short_open_tagOnOn
SMTPlocalhostlocalhost
smtp_port2525
sql.safe_modeOffOff
track_errorsOnOn
unserialize_callback_funcno valueno value
upload_max_filesize2M2M
upload_tmp_dirno valueno value
user_dirno valueno value
user_ini.cache_ttl300300
user_ini.filename.user.ini.user.ini
variables_orderGPCSGPCS
windows.show_crt_warningOffOff
xmlrpc_error_number00
xmlrpc_errorsOffOff
zend.detect_unicodeOnOn
zend.enable_gcOnOn
zend.multibyteOffOff
zend.script_encodingno valueno value

\n

ctype

\n\n\n
ctype functions enabled

\n

curl

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
cURL support enabled
cURL Information 7.38.0
Age 3
Features
AsynchDNS Yes
Debug No
GSS-Negotiate No
IDN No
IPv6 Yes
Largefile Yes
NTLM Yes
SPNEGO Yes
SSL Yes
SSPI Yes
krb4 No
libz Yes
CharConv No
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host i386-pc-win32
SSL Version OpenSSL/0.9.8zf
ZLib Version 1.2.7
libSSH Version libssh2/1.4.2

\n

date

\n\n\n\n\n\n
date/time support enabled
"Olson" Timezone Database Version 2014.8
Timezone Database internal
Default timezone PRC

\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
date.default_latitude31.766731.7667
date.default_longitude35.233335.2333
date.sunrise_zenith90.58333390.583333
date.sunset_zenith90.58333390.583333
date.timezonePRCPRC

\n

dom

\n\n\n\n\n\n\n\n\n\n
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.7.8
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

\n

ereg

\n\n\n
Regex Library Bundled library enabled

\n

filter

\n\n\n\n
Input Validation and Filtering enabled
Revision $Id: ad78b4a085153b8c7f4d6db5dc69df40e969c343 $

\n\n\n\n\n
DirectiveLocal ValueMaster Value
filter.defaultunsafe_rawunsafe_raw
filter.default_flagsno valueno value

\n

ftp

\n\n\n
FTP support enabled

\n

gd

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
GD Support enabled
GD Version bundled (2.1.0 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.4.10
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 8
PNG Support enabled
libPNG Version 1.2.50
WBMP Support enabled
XPM Support enabled
libXpm Version 30411
XBM Support enabled

\n\n\n\n
DirectiveLocal ValueMaster Value
gd.jpeg_ignore_warning00

\n

hash

\n\n\n\n
hash support enabled
Hashing Engines md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b fnv132 fnv164 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

\n

iconv

\n\n\n\n\n
iconv support enabled
iconv implementation "libiconv"
iconv library version 1.14

\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
iconv.input_encodingISO-8859-1ISO-8859-1
iconv.internal_encodingISO-8859-1ISO-8859-1
iconv.output_encodingISO-8859-1ISO-8859-1

\n

json

\n\n\n\n
json support enabled
json version 1.2.1

\n

libxml

\n\n\n\n\n\n
libXML support active
libXML Compiled Version 2.7.8
libXML Loaded Version 20708
libXML streams enabled

\n

mbstring

\n\n\n\n\n\n
Multibyte Support enabled
Multibyte string engine libmbfl
HTTP input encoding translation disabled
libmbfl version 1.3.2

\n\n\n
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

\n\n\n\n
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 4.7.1

\n\n\n\n\n\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
mbstring.detect_orderno valueno value
mbstring.encoding_translationOffOff
mbstring.func_overload00
mbstring.http_inputpasspass
mbstring.http_outputpasspass
mbstring.http_output_conv_mimetypes^(text/|application/xhtml\\+xml)^(text/|application/xhtml\\+xml)
mbstring.internal_encodingno valueno value
mbstring.languageneutralneutral
mbstring.strict_detectionOffOff
mbstring.substitute_characterno valueno value

\n

mcrypt

\n\n\n\n\n\n\n\n
mcrypt supportenabled
mcrypt_filter supportenabled
Version 2.5.8
Api No 20021217
Supported ciphers cast-128 gost rijndael-128 twofish cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes arcfour
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

\n\n\n\n\n
DirectiveLocal ValueMaster Value
mcrypt.algorithms_dirno valueno value
mcrypt.modes_dirno valueno value

\n

mhash

\n\n\n\n
MHASH support Enabled
MHASH API Version Emulated Support

\n

mysql

\n\n\n\n\n\n
MySQL Supportenabled
Active Persistent Links 0
Active Links 0
Client API version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
mysql.allow_local_infileOnOn
mysql.allow_persistentOnOn
mysql.connect_timeout6060
mysql.default_hostno valueno value
mysql.default_passwordno valueno value
mysql.default_portno valueno value
mysql.default_socketno valueno value
mysql.default_userno valueno value
mysql.max_linksUnlimitedUnlimited
mysql.max_persistentUnlimitedUnlimited
mysql.trace_modeOffOff

\n

mysqli

\n\n\n\n\n\n\n
MysqlI Supportenabled
Client API library version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0

\n\n\n\n\n\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
mysqli.allow_local_infileOnOn
mysqli.allow_persistentOnOn
mysqli.default_hostno valueno value
mysqli.default_port33063306
mysqli.default_pwno valueno value
mysqli.default_socketno valueno value
mysqli.default_userno valueno value
mysqli.max_linksUnlimitedUnlimited
mysqli.max_persistentUnlimitedUnlimited
mysqli.reconnectOffOff

\n

mysqlnd

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
mysqlndenabled
Version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $
Compression supported
SSL supported
Command buffer size 4096
Read buffer size 32768
Read timeout 31536000
Collecting statistics Yes
Collecting memory statistics Yes
Tracing n/a
Loaded plugins mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API Extensions mysql,mysqli,pdo_mysql

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
mysqlnd statistics
bytes_sent 0
bytes_received 0
packets_sent 0
packets_received 0
protocol_overhead_in 0
protocol_overhead_out 0
bytes_received_ok_packet 0
bytes_received_eof_packet 0
bytes_received_rset_header_packet 0
bytes_received_rset_field_meta_packet 0
bytes_received_rset_row_packet 0
bytes_received_prepare_response_packet 0
bytes_received_change_user_packet 0
packets_sent_command 0
packets_received_ok 0
packets_received_eof 0
packets_received_rset_header 0
packets_received_rset_field_meta 0
packets_received_rset_row 0
packets_received_prepare_response 0
packets_received_change_user 0
result_set_queries 0
non_result_set_queries 0
no_index_used 0
bad_index_used 0
slow_queries 0
buffered_sets 0
unbuffered_sets 0
ps_buffered_sets 0
ps_unbuffered_sets 0
flushed_normal_sets 0
flushed_ps_sets 0
ps_prepared_never_executed 0
ps_prepared_once_executed 0
rows_fetched_from_server_normal 0
rows_fetched_from_server_ps 0
rows_buffered_from_client_normal 0
rows_buffered_from_client_ps 0
rows_fetched_from_client_normal_buffered 0
rows_fetched_from_client_normal_unbuffered 0
rows_fetched_from_client_ps_buffered 0
rows_fetched_from_client_ps_unbuffered 0
rows_fetched_from_client_ps_cursor 0
rows_affected_normal 0
rows_affected_ps 0
rows_skipped_normal 0
rows_skipped_ps 0
copy_on_write_saved 0
copy_on_write_performed 0
command_buffer_too_small 0
connect_success 0
connect_failure 0
connection_reused 0
reconnect 0
pconnect_success 0
active_connections 0
active_persistent_connections 0
explicit_close 0
implicit_close 0
disconnect_close 0
in_middle_of_command_close 0
explicit_free_result 0
implicit_free_result 0
explicit_stmt_close 0
implicit_stmt_close 0
mem_emalloc_count 0
mem_emalloc_amount 0
mem_ecalloc_count 0
mem_ecalloc_amount 0
mem_erealloc_count 0
mem_erealloc_amount 0
mem_efree_count 0
mem_efree_amount 0
mem_malloc_count 0
mem_malloc_amount 0
mem_calloc_count 0
mem_calloc_amount 0
mem_realloc_count 0
mem_realloc_amount 0
mem_free_count 0
mem_free_amount 0
mem_estrndup_count 0
mem_strndup_count 0
mem_estndup_count 0
mem_strdup_count 0
proto_text_fetched_null 0
proto_text_fetched_bit 0
proto_text_fetched_tinyint 0
proto_text_fetched_short 0
proto_text_fetched_int24 0
proto_text_fetched_int 0
proto_text_fetched_bigint 0
proto_text_fetched_decimal 0
proto_text_fetched_float 0
proto_text_fetched_double 0
proto_text_fetched_date 0
proto_text_fetched_year 0
proto_text_fetched_time 0
proto_text_fetched_datetime 0
proto_text_fetched_timestamp 0
proto_text_fetched_string 0
proto_text_fetched_blob 0
proto_text_fetched_enum 0
proto_text_fetched_set 0
proto_text_fetched_geometry 0
proto_text_fetched_other 0
proto_binary_fetched_null 0
proto_binary_fetched_bit 0
proto_binary_fetched_tinyint 0
proto_binary_fetched_short 0
proto_binary_fetched_int24 0
proto_binary_fetched_int 0
proto_binary_fetched_bigint 0
proto_binary_fetched_decimal 0
proto_binary_fetched_float 0
proto_binary_fetched_double 0
proto_binary_fetched_date 0
proto_binary_fetched_year 0
proto_binary_fetched_time 0
proto_binary_fetched_datetime 0
proto_binary_fetched_timestamp 0
proto_binary_fetched_string 0
proto_binary_fetched_blob 0
proto_binary_fetched_enum 0
proto_binary_fetched_set 0
proto_binary_fetched_geometry 0
proto_binary_fetched_other 0
init_command_executed_count 0
init_command_failed_count 0
com_quit 0
com_init_db 0
com_query 0
com_field_list 0
com_create_db 0
com_drop_db 0
com_refresh 0
com_shutdown 0
com_statistics 0
com_process_info 0
com_connect 0
com_process_kill 0
com_debug 0
com_ping 0
com_time 0
com_delayed_insert 0
com_change_user 0
com_binlog_dump 0
com_table_dump 0
com_connect_out 0
com_register_slave 0
com_stmt_prepare 0
com_stmt_execute 0
com_stmt_send_long_data 0
com_stmt_close 0
com_stmt_reset 0
com_stmt_set_option 0
com_stmt_fetch 0
com_deamon 0
bytes_received_real_data_normal 0
bytes_received_real_data_ps 0

\n\n\n\n\n
example statistics
stat1 0
stat2 0

\n

odbc

\n\n\n\n\n\n
ODBC Supportenabled
Active Persistent Links 0
Active Links 0
ODBC library Win32

\n\n\n\n\n\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
odbc.allow_persistentOnOn
odbc.check_persistentOnOn
odbc.default_cursortypeStatic cursorStatic cursor
odbc.default_dbno valueno value
odbc.default_pwno valueno value
odbc.default_userno valueno value
odbc.defaultbinmodereturn as isreturn as is
odbc.defaultlrlreturn up to 4096 bytesreturn up to 4096 bytes
odbc.max_linksUnlimitedUnlimited
odbc.max_persistentUnlimitedUnlimited

\n

openssl

\n\n\n\n\n
OpenSSL support enabled
OpenSSL Library Version OpenSSL 0.9.8zf 19 Mar 2015
OpenSSL Header Version OpenSSL 0.9.8zb 6 Aug 2014

\n

pcre

\n\n\n\n
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 8.37 2015-04-28

\n\n\n\n\n
DirectiveLocal ValueMaster Value
pcre.backtrack_limit10000001000000
pcre.recursion_limit100000100000

\n

PDO

\n\n\n\n
PDO supportenabled
PDO drivers mysql, odbc, sqlite

\n

pdo_mysql

\n\n\n\n
PDO Driver for MySQLenabled
Client API version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $

\n

PDO_ODBC

\n\n\n\n
PDO Driver for ODBC (Win32)enabled
ODBC Connection Pooling Enabled, strict matching

\n

pdo_sqlite

\n\n\n\n
PDO Driver for SQLite 3.xenabled
SQLite Library 3.7.7.1

\n

Phar

\n\n\n\n\n\n\n\n\n\n\n\n
Phar: PHP Archive supportenabled
Phar EXT version 2.0.1
Phar API version 1.1.1
SVN revision $Id: ba734629367f9671b25202408d13914fa63d8396 $
Phar-based phar archives enabled
Tar-based phar archives enabled
ZIP-based phar archives enabled
gzip compression enabled
bzip2 compression enabled
OpenSSL support enabled

\n\n\n
\nPhar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.

\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
phar.cache_listno valueno value
phar.readonlyOnOn
phar.require_hashOnOn

\n

Reflection

\n\n\n\n
Reflectionenabled
Version $Id: f6367cdb4e3f392af4a6d441a6641de87c2e50c4 $

\n

session

\n\n\n\n\n
Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary wddx

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
session.auto_startOffOff
session.cache_expire180180
session.cache_limiternocachenocache
session.cookie_domainno valueno value
session.cookie_httponlyOffOff
session.cookie_lifetime00
session.cookie_path//
session.cookie_secureOffOff
session.entropy_fileno valueno value
session.entropy_length00
session.gc_divisor10001000
session.gc_maxlifetime14401440
session.gc_probability11
session.hash_bits_per_character55
session.hash_function00
session.namePHPSESSIDPHPSESSID
session.referer_checkno valueno value
session.save_handlerfilesfiles
session.save_pathE:\\software\\phpstudy\\tmp\\tmpE:\\software\\phpstudy\\tmp\\tmp
session.serialize_handlerphpphp
session.upload_progress.cleanupOnOn
session.upload_progress.enabledOnOn
session.upload_progress.freq1%1%
session.upload_progress.min_freq11
session.upload_progress.namePHP_SESSION_UPLOAD_PROGRESSPHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefixupload_progress_upload_progress_
session.use_cookiesOnOn
session.use_only_cookiesOnOn
session.use_trans_sid00

\n

SimpleXML

\n\n\n\n\n
Simplexml supportenabled
Revision $Id: 16070fc92ad6f69cebb2d52ad3f02794f833ce39 $
Schema support enabled

\n

sockets

\n\n\n
Sockets Support enabled

\n

SPL

\n\n\n\n\n
SPL supportenabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

\n

sqlite3

\n\n\n\n\n
SQLite3 supportenabled
SQLite3 module version 0.7
SQLite Library 3.7.7.1

\n\n\n\n
DirectiveLocal ValueMaster Value
sqlite3.extension_dirno valueno value

\n

standard

\n\n\n\n
Dynamic Library Support enabled
Path to sendmail no value

\n\n\n\n\n\n\n\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
assert.active11
assert.bail00
assert.callbackno valueno value
assert.quiet_eval00
assert.warning11
auto_detect_line_endings00
default_socket_timeout6060
fromno valueno value
url_rewriter.tagsa=href,area=href,frame=src,input=src,form=fakeentrya=href,area=href,frame=src,input=src,form=fakeentry
user_agentno valueno value

\n

tokenizer

\n\n\n
Tokenizer Support enabled

\n

wddx

\n\n\n\n
WDDX Supportenabled
WDDX Session Serializer enabled

\n

xml

\n\n\n\n\n
XML Support active
XML Namespace Support active
libxml2 Version 2.7.8

\n

xmlreader

\n\n\n
XMLReader enabled

\n

xmlrpc

\n\n\n\n\n\n\n
core library version xmlrpc-epi v. 0.51
php extension version 0.51
author Dan Libby
homepage http://xmlrpc-epi.sourceforge.net
open sourced by Epinions.com

\n

xmlwriter

\n\n\n
XMLWriter enabled

\n

xsl

\n\n\n\n\n\n\n
XSL enabled
libxslt Version 1.1.27
libxslt compiled against libxml Version 2.7.8
EXSLT enabled
libexslt Version 0.8.16

\n

Zend Guard Loader

\n\n\n\n\n
Zend Guard Loader enabled
License Path no value
Obfuscation level 3

\n

zip

\n\n\n\n\n\n
Zip enabled
Extension Version $Id: 6c872ebfb022206b0cc2a183c7a388c7b6ad8685 $
Zip version 1.11.0
Libzip version 0.10.1

\n

zlib

\n\n\n\n\n\n\n
ZLib Supportenabled
Stream Wrapper compress.zlib://
Stream Filter zlib.inflate, zlib.deflate
Compiled Version 1.2.7
Linked Version 1.2.7

\n\n\n\n\n\n
DirectiveLocal ValueMaster Value
zlib.output_compressionOffOff
zlib.output_compression_level-1-1
zlib.output_handlerno valueno value

\n

Additional Modules

\n\n\n
Module Name

\n

Environment

\n\n\n\n\n\n\n\n\n\n\n
VariableValue
PATH
SYSTEMROOT C:\\Windows
COMSPEC C:\\Windows\\system32\\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\\Windows
PHP_FCGI_MAX_REQUESTS 1000
PHPRC E:/software/phpstudy/php/php-5.4.45-nts/
_FCGI_SHUTDOWN_EVENT_ 1988

\n

PHP Variables

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
VariableValue
_REQUEST["key"]value
_COOKIE["key"]value
_SERVER["PATH"]E:\\software\\xftp4\\;E:\\software\\xshell5\\;C:\\ProgramData\\Oracle\\Java\\javapath;E:\\software\\RailsInstaller\\Ruby2.3.3\\bin;C:\\Program Files (x86)\\Common Files\\NetSarang;E:\\Oracle\\app\\Lee\\product\\11.2.0\\dbhome_1\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;E:\\jdk1.7.0_17\\bin;E:\\jdk1.7.0_17\\jre\\bin;C:\\Program Files\\Lenovo\\Fingerprint Manager Pro\\;E:\\software\\Git\\cmd;E:\\software\\python2.7.13;E:\\software\\python2.7.13\\Scripts;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\VSShell\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\PrivateAssemblies\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\DTS\\Binn\\;E:\\software\\php-5.6.36-Win32-VC11-x64;E:\\software\\php-5.6.36-Win32-VC11-x64\\ext;F:\\Hyenae;D:\\软件\\HP\\LoadRunner\\strawberry-perl\\perl\\bin;D:\\MinGW\\bin;E:\\node\\;E:\\software\\python3.6;E:\\software\\python3.6\\Scripts;E:\\software\\Nmap;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\dotnet\\;D:\\apache-maven-3.6.1\\bin;E:\\software\\mysql-8.0.17-winx64\\bin\\;C:\\Users\\Administrator\\AppData\\Roaming\\npm;E:\\software\\Nmap
_SERVER["SYSTEMROOT"]C:\\Windows
_SERVER["COMSPEC"]C:\\Windows\\system32\\cmd.exe
_SERVER["PATHEXT"].COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
_SERVER["WINDIR"]C:\\Windows
_SERVER["PHP_FCGI_MAX_REQUESTS"]1000
_SERVER["PHPRC"]E:/software/phpstudy/php/php-5.4.45-nts/
_SERVER["_FCGI_SHUTDOWN_EVENT_"]1988
_SERVER["HTTP_CONNECTION"]close
_SERVER["SCRIPT_NAME"]/phpinfo.php
_SERVER["REQUEST_URI"]/phpinfo.php
_SERVER["QUERY_STRING"]no value
_SERVER["REQUEST_METHOD"]GET
_SERVER["SERVER_PROTOCOL"]HTTP/1.1
_SERVER["GATEWAY_INTERFACE"]CGI/1.1
_SERVER["REMOTE_PORT"]53146
_SERVER["SCRIPT_FILENAME"]E:/software/phpstudy/WWW/phpinfo.php
_SERVER["SERVER_ADMIN"]admin@phpStudy.net
_SERVER["CONTEXT_DOCUMENT_ROOT"]E:/software/phpstudy/WWW
_SERVER["CONTEXT_PREFIX"]no value
_SERVER["REQUEST_SCHEME"]http
_SERVER["DOCUMENT_ROOT"]E:/software/phpstudy/WWW
_SERVER["REMOTE_ADDR"]::1
_SERVER["SERVER_PORT"]808
_SERVER["SERVER_ADDR"]::1
_SERVER["SERVER_NAME"]localhost
_SERVER["SERVER_SOFTWARE"]Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9
_SERVER["SERVER_SIGNATURE"]no value
_SERVER["SystemRoot"]C:\\Windows
_SERVER["HTTP_ACCEPT_ENCODING"]gzip
_SERVER["HTTP_COOKIE"]key=value
_SERVER["CONTENT_TYPE"]text/plain
_SERVER["HTTP_USER_AGENT"]Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169
_SERVER["HTTP_HOST"]localhost:808
_SERVER["FCGI_ROLE"]RESPONDER
_SERVER["PHP_SELF"]/phpinfo.php
_SERVER["REQUEST_TIME_FLOAT"]1575984761.036
_SERVER["REQUEST_TIME"]1575984761

\n

PHP License

\n\n\n
\n

\nThis program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE\n

\n

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n

\n

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.\n

\n

\n
', 'url': 'http://localhost:808/phpinfo.php'}, 'plugin': 'dirscan', 'target': {'url': 'http://localhost:808/phpinfo.php'}, 'type': 'web_vuln', 'vuln_class': 'debug'} 35 | {'create_time': 1575984761810, 'detail': {'filename': '/phpMyAdmin/index.php', 'host': 'localhost', 'param': {}, 'payload': '', 'port': 808, 'request': 'GET /phpMyAdmin/index.php HTTP/1.1\r\nHost: localhost:808\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169\r\nContent-Type: text/plain\r\nCookie: key=value\r\nAccept-Encoding: gzip\r\n\r\n', 'response': 'HTTP/1.1 200 OK\r\nCache-Control: private, max-age=10800, pre-check=10800\r\nContent-Type: text/html; charset=utf-8\r\nDate: Tue, 10 Dec 2019 13:32:40 GMT\r\nExpires: Thu, 19 Nov 1981 08:52:00 GMT\r\nLast-Modified: Sat, 27 Jul 2013 22:34:50 GMT\r\nServer: Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9\r\nSet-Cookie: pma_lang=en; expires=Thu, 09-Jan-2020 13:32:41 GMT; path=/phpMyAdmin/; httponly\r\nSet-Cookie: pma_mcrypt_iv=dWEpYziYIyA%3D; expires=Thu, 09-Jan-2020 13:32:41 GMT; path=/phpMyAdmin/; httponly\r\nSet-Cookie: phpMyAdmin=s4cl21j4bgmsjbvo6klt7arljjtsgte7; path=/phpMyAdmin/; HttpOnly\r\nX-Powered-By: PHP/5.4.45\r\n\r\n\n\n\n \n \n \n phpMyAdmin \n \n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n
\n\n

\n Welcome to phpMyAdmin

\n \n
\n
Language\n \n
\n \n
\n
\n\n
\n
\n \nLog in phpMyAdmin documentation\n\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n
\n
\n\n
\n \n\n ', 'url': 'http://localhost:808/phpMyAdmin/index.php'}, 'plugin': 'dirscan', 'target': {'url': 'http://localhost:808/phpMyAdmin/index.php'}, 'type': 'web_vuln', 'vuln_class': 'admin'} 36 | {'average_response_time': 579.239, 'num_found_urls': 0, 'num_scanned_urls': 0, 'num_sent_http_requests': 626, 'ratio_failed_http_requests': 0, 'ratio_progress': 0, 'type': 'web_statistic'} 37 | 38 | 39 | ''' 40 | try: 41 | url = vuln["target"]["url"] 42 | param = str(vuln['detail']['param']) # dict 转 str 43 | payload = vuln['detail']['payload'] 44 | plugin = vuln["plugin"] 45 | create_time = str( 46 | datetime.datetime.fromtimestamp(vuln["create_time"] / 1000).strftime('%Y-%m-%d %H:%M:%S')) 47 | 48 | # 判断字典是否含有某key 49 | # 暴力破解获得的用户名和密码 50 | if 'username' in vuln.keys() and vuln.__contains__('password'): 51 | username = str(vuln['detail']['username']) 52 | password = str(vuln['detail']['password']) 53 | param = username + ' ; ' + password 54 | 55 | content = """## 恭喜您挖到新漏洞 56 | 57 | url: {url} 58 | payload: {payload} 59 | param: {param} 60 | 插件: {plugin} 61 | 漏洞类型: {vuln_class} 62 | 发现时间: {create_time} 63 | 64 | 请及时查看和处理 65 | """.format(url=url, payload=payload, param=param, plugin=plugin, 66 | vuln_class=vuln["vuln_class"] or "Default", 67 | create_time=create_time) 68 | 69 | # print(content) 70 | except Exception as e: 71 | # The return type must be a string, dict, tuple, Response instance, or WSGI callable, 72 | return 'error' 73 | try: 74 | # dirscan/brute_force不推送 75 | if plugin != 'dirscan' and plugin != 'brute_force': 76 | push_ftqq(content) 77 | except Exception as e: 78 | # dirscan 等就不要webhook了,访问频率过高会被拉黑 79 | # ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)) 80 | print(e) 81 | try: 82 | 83 | conn = connect_db() 84 | sql = 'insert into vulscan set target="%s",vul_info="%s",payload="%s",createtime="%s",plugin_name="%s"' % ( 85 | pymysql.escape_string(url), pymysql.escape_string(param), pymysql.escape_string(payload), create_time, 86 | pymysql.escape_string(plugin)) 87 | logging.info(sql) 88 | res = conn.query(sql) 89 | conn.commit() 90 | # return content 91 | except Exception as e: 92 | print(sql) 93 | logging.exception(e) 94 | return 'ok' 95 | 96 | 97 | if __name__ == '__main__': 98 | app.run(host='0.0.0.0', port='5000') 99 | -------------------------------------------------------------------------------- /xray sql.txt: -------------------------------------------------------------------------------- 1 | create table `vulscan` (`id` int(10) primary key NOT NULL AUTO_INCREMENT,`target` varchar(200),`vul_info` varchar(1000),`inserted` varchar(1000),`plugin_name` varchar(20) ) DEFAULT CHARSET=utf8mb4; 2 | 3 | alter table vulscan add memo varchar(500) default null ; 4 | -------------------------------------------------------------------------------- /xray_deploy_in_onekey.py: -------------------------------------------------------------------------------- 1 | __author__ = 'leezp' 2 | # xray 一键部署 3 | # 191210 4 | # -*- coding:utf-8 -*- 5 | # 最后如果能加上扫描端口确认服务已启动就完美了/ 查看进程号,根据结果校验 6 | 7 | 8 | import time 9 | import paramiko 10 | 11 | 12 | def creatSShConnectOb(ip_remote, port_remote, username, password): 13 | print('---------- start to create SSH object') 14 | print( 15 | 'Remote SSH Info: \'ip:%s port:%d username:%s password:%s\'' % (ip_remote, port_remote, username, password)) 16 | ssh = paramiko.SSHClient() 17 | ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) 18 | try: 19 | ssh.connect(ip_remote, port_remote, username=username, password=password, timeout=60) # timeout protection 20 | return ssh 21 | except: 22 | print('Warning:\nFist connect the ABC failed, now will retry!') 23 | ssh.connect(ip_remote, port_remote, username=username, password=password, timeout=60) # timeout re-try 24 | print('Error:\nAttempt to connect ABC failed!!! Please check the IP / port/ account / password.') 25 | 26 | 27 | def chanel_exe_cmd(ChanelSSHOb, cmd, t=0.1): 28 | ChanelSSHOb.send(cmd) 29 | ChanelSSHOb.send("\n") 30 | time.sleep(t) 31 | resp = ChanelSSHOb.recv(9999).decode("utf8") 32 | # print("Exec Result: %s" % (resp)+'\n') 33 | return resp 34 | 35 | 36 | def upload2(ip, port, username, password): 37 | transport = paramiko.Transport((ip, port)) 38 | transport.connect(username=username, password=password) 39 | sftp = paramiko.SFTPClient.from_transport(transport) # 如果连接需要密钥,则要加上一个参数,hostkey="密钥" 40 | sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\xray-license.lic', 41 | '/tmp/xray-license.lic') 42 | sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\ca.crt', 43 | '/tmp/ca.crt') 44 | sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\ca.key', 45 | '/tmp/ca.key') 46 | sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\config.yaml', '/tmp/config.yaml') 47 | # sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\xray_linux_amd64', 48 | # '/tmp/xray_linux_amd64') 49 | transport.close() # 关闭连接 50 | 51 | 52 | def upload(ip, port, username, password): 53 | transport = paramiko.Transport((ip, port)) 54 | transport.connect(username=username, password=password) 55 | sftp = paramiko.SFTPClient.from_transport(transport) # 如果连接需要密钥,则要加上一个参数,hostkey="密钥" 56 | sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\xray-license.lic', 57 | '/home/YOURNAME/xray-license.lic') 58 | sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\ca.crt', 59 | '/home/YOURNAME/ca.crt') 60 | sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\ca.key', 61 | '/home/YOURNAME/ca.key') 62 | sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\config.yaml', '/home/YOURNAME/config.yaml') 63 | # sftp.put('C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\xray_linux_amd64', 64 | # '/home/YOURNAME/xray_linux_amd64') 65 | transport.close() # 关闭连接 66 | 67 | 68 | # 杀掉进程 69 | def kill(chanelSSHOb, ip): 70 | sshCmd = "ps aux|grep xray|grep ?|cut -d. -f1|cut -dt -f2|tr -s ' '|tr ' ' '$'|cut -d$ -f2|xargs kill -9" 71 | chanel_exe_cmd(chanelSSHOb, sshCmd) 72 | 73 | 74 | def remove(chanelSSHOb, ip): 75 | html_name = ip.split('.')[-1] + '.html' 76 | sshCmd = 'rm -f /home/YOURNAME/%s' % html_name 77 | chanel_exe_cmd(chanelSSHOb, sshCmd) 78 | sshCmd = 'rm -f /home/YOURNAME/nohup.out' 79 | chanel_exe_cmd(chanelSSHOb, sshCmd) 80 | sshCmd = 'rm -f /home/YOURNAME/config.yaml' 81 | chanel_exe_cmd(chanelSSHOb, sshCmd) 82 | sshCmd = 'rm -f /home/YOURNAME/nohup.out' 83 | chanel_exe_cmd(chanelSSHOb, sshCmd) 84 | sshCmd = 'rm -f /home/YOURNAME/xray_linux_amd64' 85 | # chanel_exe_cmd(chanelSSHOb, sshCmd) 86 | ''' 87 | sshCmd='rm -f /home/YOURNAME/ca.crt' 88 | chanel_exe_cmd(chanelSSHOb, sshCmd) 89 | sshCmd='rm -f /home/YOURNAME/ca.key' 90 | chanel_exe_cmd(chanelSSHOb, sshCmd) 91 | sshCmd='rm -f /home/YOURNAME/xray-license.lic' 92 | chanel_exe_cmd(chanelSSHOb, sshCmd) 93 | ''' 94 | 95 | 96 | ''' 97 | ip = '172.16.1.9' 98 | port = '22' 99 | username = 'XXX' 100 | passwd = 'XXX' 101 | ''' 102 | # 需要先 useradd YOURNAME 103 | 104 | if __name__ == '__main__': 105 | host = { 106 | 1: '172.16.1.247:22,root,XXX,7776' 107 | , 2: '172.16.1.225:22,root,XXX,7775' 108 | , 3: '172.16.1.209:22,root,XXX,7778' 109 | , 4: '172.16.1.248:22,root,XXX,7773' 110 | , 5: '172.16.1.230:22,root,XXX,7772' 111 | , 6: '172.16.1.249:22,root,XXX,7771' 112 | , 7: '172.16.1.9:22,root,XXX,7779' 113 | , 8: '10.1.0.224:22,root,XXX,7774' 114 | , 9: '172.16.1.220:22,root,XXX,7770' 115 | , 10: '172.16.1.10:22,root,XXX,7774' 116 | , 11: '172.16.1.47:22,XXX,XXX,7774' 117 | } 118 | for k in range(len(host)): 119 | ip = host.get(k + 1).split(':')[0].strip() 120 | port = host.get(k + 1).split(',')[0].split(':')[-1].strip() 121 | username = host.get(k + 1).split(',')[1].strip() 122 | password = host.get(k + 1).split(',')[2].strip() 123 | listen_port = host.get(k + 1).split(',')[-1].strip() 124 | 125 | ssh = creatSShConnectOb(ip, int(port), username=username, password=password) 126 | 127 | chanelSSHOb = ssh.invoke_shell() # 建立交互式的shel 128 | # 检查当前用户是否是 root 129 | Flag = True 130 | stdin, stdout, stderr = ssh.exec_command("whoami") 131 | result = stdout.read() 132 | if result and result.decode().strip() == 'root': 133 | pass 134 | else: 135 | Flag = False 136 | sshCmd = 'su' 137 | stdin, stdout, stderr = ssh.exec_command(sshCmd) 138 | if chanel_exe_cmd(chanelSSHOb, sshCmd).endswith(u"Password: "): 139 | sshCmd = 'sh_pwd' 140 | chanel_exe_cmd(chanelSSHOb, sshCmd) 141 | 142 | ''' 非 root 暂不知道怎么上传 143 | ftp =ssh.open_sftp() 144 | ftp.put( 'C:\\Users\\Administrator\\Desktop\\poc 扫描\\xray_windows_amd64.exe\\xray-license.lic','/home/YOURNAME/xray-license.lic') 145 | # 使用之后记得关闭 146 | #ftp.get() 下载 147 | ftp.close() 148 | ''' 149 | kill(chanelSSHOb, ip) 150 | remove(chanelSSHOb, ip) 151 | if Flag: 152 | # root 用户上传 153 | # upload('172.16.1.9', 22, 'XXX', 'XXX') 154 | upload(ip, int(port), username, password) 155 | else: 156 | # 非 root 用户上传到 /tmp 157 | upload2(ip, int(port), username, password) 158 | sshCmd = 'mv /tmp/xray-license.lic /home/YOURNAME' 159 | chanel_exe_cmd(chanelSSHOb, sshCmd) 160 | sshCmd = 'mv /tmp/ca.crt /home/YOURNAME' 161 | chanel_exe_cmd(chanelSSHOb, sshCmd) 162 | sshCmd = 'mv /tmp/ca.key /home/YOURNAME' 163 | chanel_exe_cmd(chanelSSHOb, sshCmd) 164 | sshCmd = 'mv /tmp/config.yaml /home/YOURNAME' 165 | chanel_exe_cmd(chanelSSHOb, sshCmd) 166 | sshCmd = 'mv /tmp/xray_linux_amd64 /home/YOURNAME' 167 | chanel_exe_cmd(chanelSSHOb, sshCmd) 168 | 169 | sshCmd = 'cd /home/YOURNAME && chmod 555 xray_linux_amd64' 170 | chanel_exe_cmd(chanelSSHOb, sshCmd) 171 | # 添加ssl证书 172 | sshCmd = 'cd /home/YOURNAME && cp ca.crt /etc/pki/ca-trust/source/anchors/' 173 | chanel_exe_cmd(chanelSSHOb, sshCmd) 174 | sshCmd = 'update-ca-trust extract' 175 | chanel_exe_cmd(chanelSSHOb, sshCmd) 176 | 177 | sshCmd = 'cd /home/YOURNAME && nohup ./xray_linux_amd64 webscan --listen 0.0.0.0:%d --webhook-output http://YOURMYSQLIP:5000/webhook' % int( 178 | listen_port) 179 | # print(sshCmd) 180 | print(chanel_exe_cmd(chanelSSHOb, sshCmd)) 181 | 182 | ''' 183 | def upload(ip): 184 | transport = paramiko.Transport((ip, 22)) 185 | transport.connect(username='XXX', password='XXX') 186 | sftp = paramiko.SFTPClient.from_transport(transport) # 如果连接需要密钥,则要加上一个参数,hostkey="密钥" 187 | # 上传至 tmp 目录,其他目录权限不够 188 | sftp.put('C:\\Users\\Administrator\\Desktop\\a.txt', '/tmp/a.txt') 189 | transport.close() # 关闭连接 190 | ''' 191 | # sshCmd = 'mv /tmp/a.txt /home/YOURNAME' 192 | # print(chanel_exe_cmd(chanelSSHOb, sshCmd)) 193 | ''' 194 | ssh = creatSShConnectOb(ip, int(port), username=username, password=passwd) 195 | stdin, stdout, stderr = ssh.exec_command(cmd) 196 | result = stdout.read() 197 | if result: 198 | if result.decode().strip() == 'XXX': 199 | return result.decode() 200 | else: 201 | print("连接失败!") 202 | result = stderr.read() 203 | ssh.close() 204 | ''' 205 | -------------------------------------------------------------------------------- /批量处理子域名文件(10k).bat: -------------------------------------------------------------------------------- 1 | :: author : leezp 2 | @echo off 3 | pushd "%~dp0" 4 | :: md 1 创建文件夹 1 5 | md 1 6 | type nul > 1/a_output.txt 7 | for /f "delims=" %%i in ('dir /b /a-d "*.txt"') do ( 8 | :: == 判断文件大小为 0字节 9 | if %%~zi == 0 ( 10 | :: 以 _ 作分隔符 分割, www.baidu.com_full.txt 11 | for /f "delims=_" %%j in ('dir /b /a-d "%%i"') do ( 12 | echo %%j >> "1/a_output.txt" 13 | ) 14 | ) 15 | if %%~zi gtr 0 ( 16 | if %%~zi LSS 10000 ( 17 | type "%%i" >> "1/a_output.txt" 18 | echo %%i 19 | ) 20 | ) 21 | if %%~zi == 10000 ( 22 | move "%%i" "1\" 23 | ) 24 | if %%~zi gtr 10000 ( 25 | move "%%i" "1\" 26 | ) 27 | ) 28 | 29 | 30 | :: gtr 表示大于 多少 字节 , LSS 表示 小于 多少字节,遍历当前目录 *.txt 文件 31 | :: move "%%i" "1\" 将文件移动到当前目录 1文件夹下 32 | :: dir /b /s /a-d "*.txt" 其中 /s 表示遍历,去掉/s 只判断当前目录 33 | :: for默认是以空格和,:;/等标点符号作分割符的,所以要取得整行内容通常会用"delims="这样的形式来取消for的默认分割符。 34 | :: echo %%~ni >> "1/a_output.txt" ::只输出文件名,不输出扩展名 --------------------------------------------------------------------------------