├── 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 | 
24 |
25 | 3.批量处理子域名
26 |
27 | 运行```批量处理子域名文件(10k).bat```
28 |
29 | 此步骤作用为:扫描出来的子域名文件大小<10k的复制到一个txt中(a_output.txt)。文件大小>=10k 的 剪切到 当前目录 “1” 文件夹下,下一步对这些大文件进行清洗。
30 |
31 | 
32 |
33 |
34 | 4.子域名清洗
35 |
36 | 1). 去掉无法访问的子域名,
37 |
38 | 简单写了一些状态码,排除掉:
39 |
40 | 
41 |
42 | python3 statusCodeClean.py -f url_full.txt
43 |
44 | 转化成bat文件。 ```batchStatusCodeClean.bat``` 批量执行状态码清洗
45 |
46 | 2). 去重复。比如淘宝的资产,去掉一些重复的店铺和由于高并发访问导致的验证码页面,这些页面是一个模板,只需要扫描一个就行了。
47 |
48 | 
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 | 
62 |
63 | 数据库创建语句见 xray sql.txt
64 |
65 | 5.开启 webhook
66 |
67 | 
68 |
69 | ### 部署扫描器
70 |
71 | 6.采用批量连接ssh(我这里部署到10台本地服务器上),批量上传扫描器和配置文件,批量启动扫描器。
72 |
73 | xray_deploy_in_onekey.py
74 |
75 | 7.使用 awvs 12 用api调用,找到api并复制。
76 |
77 | 
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\nPHP Version 5.4.45 \n \n
\n
\nSystem Windows NT LEE-PC 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586 \nBuild Date Sep 2 2015 23:45:20 \nCompiler MSVC9 (Visual C++ 2008) \nArchitecture x86 \nConfigure 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" \nServer API CGI/FastCGI \nVirtual Directory Support disabled \nConfiguration File (php.ini) Path C:\\Windows \nLoaded Configuration File E:\\software\\phpstudy\\php\\php-5.4.45-nts\\php.ini \nScan this dir for additional .ini files (none) \nAdditional .ini files parsed (none) \nPHP API 20100412 \nPHP Extension 20100525 \nZend Extension 220100525 \nZend Extension Build API220100525,NTS,VC9 \nPHP Extension Build API20100525,NTS,VC9 \nDebug Build no \nThread Safety disabled \nZend Signal Handling disabled \nZend Memory Manager enabled \nZend Multibyte Support provided by mbstring \nIPv6 Support enabled \nDTrace Support disabled \nRegistered PHP Streams php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, phar \nRegistered Stream Socket Transports tcp, udp, ssl, sslv3, sslv2, tls \nRegistered Stream Filters convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.* \n
\n
\n\n \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
\n
\n
\n
Configuration \n
\n
\nBCMath support enabled \n
\n
\nDirective Local Value Master Value \nbcmath.scale 0 0 \n
\n
\n
\nBZip2 Support Enabled \nStream Wrapper support compress.bzip2:// \nStream Filter support bzip2.decompress, bzip2.compress \nBZip2 Version 1.0.6, 6-Sept-2010 \n
\n
\n
\nCalendar support enabled \n
\n
\n
\nDirective Local Value Master Value \ncgi.check_shebang_line 1 1 \ncgi.discard_path 0 0 \ncgi.fix_pathinfo 1 1 \ncgi.force_redirect 0 0 \ncgi.nph 0 0 \ncgi.redirect_status_env no value no value \ncgi.rfc2616_headers 0 0 \nfastcgi.impersonate 1 1 \nfastcgi.logging 1 1 \n
\n
\n
\n
\nDirective Local Value Master Value \nallow_url_fopen On On \nallow_url_include On On \nalways_populate_raw_post_data Off Off \narg_separator.input & & \narg_separator.output & & \nasp_tags Off Off \nauto_append_file no value no value \nauto_globals_jit On On \nauto_prepend_file no value no value \nbrowscap no value no value \ndefault_charset no value no value \ndefault_mimetype text/html text/html \ndisable_classes no value no value \ndisable_functions no value no value \ndisplay_errors On On \ndisplay_startup_errors On On \ndoc_root no value no value \ndocref_ext no value no value \ndocref_root no value no value \nenable_dl On On \nenable_post_data_reading On On \nerror_append_string no value no value \nerror_log no value no value \nerror_prepend_string no value no value \nerror_reporting 32767 32767 \nexit_on_timeout Off Off \nexpose_php On On \nextension_dir E:\\software\\phpstudy\\php\\php-5.4.45-nts\\ext E:\\software\\phpstudy\\php\\php-5.4.45-nts\\ext \nfile_uploads On On \nhighlight.comment #FF8000 #FF8000 \nhighlight.default #0000BB #0000BB \nhighlight.html #000000 #000000 \nhighlight.keyword #007700 #007700 \nhighlight.string #DD0000 #DD0000 \nhtml_errors On On \nignore_repeated_errors Off Off \nignore_repeated_source Off Off \nignore_user_abort Off Off \nimplicit_flush Off Off \ninclude_path .;C:\\php\\pear .;C:\\php\\pear \nlog_errors On On \nlog_errors_max_len 1024 1024 \nmail.add_x_header On On \nmail.force_extra_parameters no value no value \nmail.log no value no value \nmax_execution_time 30 30 \nmax_file_uploads 20 20 \nmax_input_nesting_level 64 64 \nmax_input_time 60 60 \nmax_input_vars 1000 1000 \nmemory_limit 128M 128M \nopen_basedir no value no value \noutput_buffering 4096 4096 \noutput_handler no value no value \npost_max_size 8M 8M \nprecision 14 14 \nrealpath_cache_size 16K 16K \nrealpath_cache_ttl 120 120 \nregister_argc_argv Off Off \nreport_memleaks On On \nreport_zend_debug On On \nrequest_order CGP CGP \nsendmail_from no value no value \nsendmail_path no value no value \nserialize_precision 17 17 \nshort_open_tag On On \nSMTP localhost localhost \nsmtp_port 25 25 \nsql.safe_mode Off Off \ntrack_errors On On \nunserialize_callback_func no value no value \nupload_max_filesize 2M 2M \nupload_tmp_dir no value no value \nuser_dir no value no value \nuser_ini.cache_ttl 300 300 \nuser_ini.filename .user.ini .user.ini \nvariables_order GPCS GPCS \nwindows.show_crt_warning Off Off \nxmlrpc_error_number 0 0 \nxmlrpc_errors Off Off \nzend.detect_unicode On On \nzend.enable_gc On On \nzend.multibyte Off Off \nzend.script_encoding no value no value \n
\n
\n
\nctype functions enabled \n
\n
\n
\ncURL support enabled \ncURL Information 7.38.0 \nAge 3 \nFeatures \nAsynchDNS Yes \nDebug No \nGSS-Negotiate No \nIDN No \nIPv6 Yes \nLargefile Yes \nNTLM Yes \nSPNEGO Yes \nSSL Yes \nSSPI Yes \nkrb4 No \nlibz Yes \nCharConv No \nProtocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp \nHost i386-pc-win32 \nSSL Version OpenSSL/0.9.8zf \nZLib Version 1.2.7 \nlibSSH Version libssh2/1.4.2 \n
\n
\n
\ndate/time support enabled \n"Olson" Timezone Database Version 2014.8 \nTimezone Database internal \nDefault timezone PRC \n
\n
\nDirective Local Value Master Value \ndate.default_latitude 31.7667 31.7667 \ndate.default_longitude 35.2333 35.2333 \ndate.sunrise_zenith 90.583333 90.583333 \ndate.sunset_zenith 90.583333 90.583333 \ndate.timezone PRC PRC \n
\n
\n
\nDOM/XML enabled \nDOM/XML API Version 20031129 \nlibxml Version 2.7.8 \nHTML Support enabled \nXPath Support enabled \nXPointer Support enabled \nSchema Support enabled \nRelaxNG Support enabled \n
\n
\n
\nRegex Library Bundled library enabled \n
\n
\n
\nInput Validation and Filtering enabled \nRevision $Id: ad78b4a085153b8c7f4d6db5dc69df40e969c343 $ \n
\n
\nDirective Local Value Master Value \nfilter.default unsafe_raw unsafe_raw \nfilter.default_flags no value no value \n
\n
\n
\n
\n
\nGD Support enabled \nGD Version bundled (2.1.0 compatible) \nFreeType Support enabled \nFreeType Linkage with freetype \nFreeType Version 2.4.10 \nGIF Read Support enabled \nGIF Create Support enabled \nJPEG Support enabled \nlibJPEG Version 8 \nPNG Support enabled \nlibPNG Version 1.2.50 \nWBMP Support enabled \nXPM Support enabled \nlibXpm Version 30411 \nXBM Support enabled \n
\n
\nDirective Local Value Master Value \ngd.jpeg_ignore_warning 0 0 \n
\n
\n
\nhash support enabled \nHashing 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
\n
\n
\niconv support enabled \niconv implementation "libiconv" \niconv library version 1.14 \n
\n
\nDirective Local Value Master Value \niconv.input_encoding ISO-8859-1 ISO-8859-1 \niconv.internal_encoding ISO-8859-1 ISO-8859-1 \niconv.output_encoding ISO-8859-1 ISO-8859-1 \n
\n
\n
\njson support enabled \njson version 1.2.1 \n
\n
\n
\nlibXML support active \nlibXML Compiled Version 2.7.8 \nlibXML Loaded Version 20708 \nlibXML streams enabled \n
\n
\n
\nMultibyte Support enabled \nMultibyte string engine libmbfl \nHTTP input encoding translation disabled \nlibmbfl version 1.3.2 \n
\n
\nmbstring 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
\nMultibyte (japanese) regex support enabled \nMultibyte regex (oniguruma) version 4.7.1 \n
\n
\nDirective Local Value Master Value \nmbstring.detect_order no value no value \nmbstring.encoding_translation Off Off \nmbstring.func_overload 0 0 \nmbstring.http_input pass pass \nmbstring.http_output pass pass \nmbstring.http_output_conv_mimetypes ^(text/|application/xhtml\\+xml) ^(text/|application/xhtml\\+xml) \nmbstring.internal_encoding no value no value \nmbstring.language neutral neutral \nmbstring.strict_detection Off Off \nmbstring.substitute_character no value no value \n
\n
\n
\nmcrypt support enabled \nmcrypt_filter support enabled \nVersion 2.5.8 \nApi No 20021217 \nSupported 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 \nSupported modes cbc cfb ctr ecb ncfb nofb ofb stream \n
\n
\nDirective Local Value Master Value \nmcrypt.algorithms_dir no value no value \nmcrypt.modes_dir no value no value \n
\n
\n
\nMHASH support Enabled \nMHASH API Version Emulated Support \n
\n
\n
\nMySQL Support enabled \nActive Persistent Links 0 \nActive Links 0 \nClient API version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $ \n
\n
\nDirective Local Value Master Value \nmysql.allow_local_infile On On \nmysql.allow_persistent On On \nmysql.connect_timeout 60 60 \nmysql.default_host no value no value \nmysql.default_password no value no value \nmysql.default_port no value no value \nmysql.default_socket no value no value \nmysql.default_user no value no value \nmysql.max_links Unlimited Unlimited \nmysql.max_persistent Unlimited Unlimited \nmysql.trace_mode Off Off \n
\n
\n
\nMysqlI Support enabled \nClient API library version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $ \nActive Persistent Links 0 \nInactive Persistent Links 0 \nActive Links 0 \n
\n
\nDirective Local Value Master Value \nmysqli.allow_local_infile On On \nmysqli.allow_persistent On On \nmysqli.default_host no value no value \nmysqli.default_port 3306 3306 \nmysqli.default_pw no value no value \nmysqli.default_socket no value no value \nmysqli.default_user no value no value \nmysqli.max_links Unlimited Unlimited \nmysqli.max_persistent Unlimited Unlimited \nmysqli.reconnect Off Off \n
\n
\n
\nmysqlnd enabled \nVersion mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $ \nCompression supported \nSSL supported \nCommand buffer size 4096 \nRead buffer size 32768 \nRead timeout 31536000 \nCollecting statistics Yes \nCollecting memory statistics Yes \nTracing n/a \nLoaded plugins mysqlnd,example,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password \nAPI Extensions mysql,mysqli,pdo_mysql \n
\n
\nmysqlnd statistics \nbytes_sent 0 \nbytes_received 0 \npackets_sent 0 \npackets_received 0 \nprotocol_overhead_in 0 \nprotocol_overhead_out 0 \nbytes_received_ok_packet 0 \nbytes_received_eof_packet 0 \nbytes_received_rset_header_packet 0 \nbytes_received_rset_field_meta_packet 0 \nbytes_received_rset_row_packet 0 \nbytes_received_prepare_response_packet 0 \nbytes_received_change_user_packet 0 \npackets_sent_command 0 \npackets_received_ok 0 \npackets_received_eof 0 \npackets_received_rset_header 0 \npackets_received_rset_field_meta 0 \npackets_received_rset_row 0 \npackets_received_prepare_response 0 \npackets_received_change_user 0 \nresult_set_queries 0 \nnon_result_set_queries 0 \nno_index_used 0 \nbad_index_used 0 \nslow_queries 0 \nbuffered_sets 0 \nunbuffered_sets 0 \nps_buffered_sets 0 \nps_unbuffered_sets 0 \nflushed_normal_sets 0 \nflushed_ps_sets 0 \nps_prepared_never_executed 0 \nps_prepared_once_executed 0 \nrows_fetched_from_server_normal 0 \nrows_fetched_from_server_ps 0 \nrows_buffered_from_client_normal 0 \nrows_buffered_from_client_ps 0 \nrows_fetched_from_client_normal_buffered 0 \nrows_fetched_from_client_normal_unbuffered 0 \nrows_fetched_from_client_ps_buffered 0 \nrows_fetched_from_client_ps_unbuffered 0 \nrows_fetched_from_client_ps_cursor 0 \nrows_affected_normal 0 \nrows_affected_ps 0 \nrows_skipped_normal 0 \nrows_skipped_ps 0 \ncopy_on_write_saved 0 \ncopy_on_write_performed 0 \ncommand_buffer_too_small 0 \nconnect_success 0 \nconnect_failure 0 \nconnection_reused 0 \nreconnect 0 \npconnect_success 0 \nactive_connections 0 \nactive_persistent_connections 0 \nexplicit_close 0 \nimplicit_close 0 \ndisconnect_close 0 \nin_middle_of_command_close 0 \nexplicit_free_result 0 \nimplicit_free_result 0 \nexplicit_stmt_close 0 \nimplicit_stmt_close 0 \nmem_emalloc_count 0 \nmem_emalloc_amount 0 \nmem_ecalloc_count 0 \nmem_ecalloc_amount 0 \nmem_erealloc_count 0 \nmem_erealloc_amount 0 \nmem_efree_count 0 \nmem_efree_amount 0 \nmem_malloc_count 0 \nmem_malloc_amount 0 \nmem_calloc_count 0 \nmem_calloc_amount 0 \nmem_realloc_count 0 \nmem_realloc_amount 0 \nmem_free_count 0 \nmem_free_amount 0 \nmem_estrndup_count 0 \nmem_strndup_count 0 \nmem_estndup_count 0 \nmem_strdup_count 0 \nproto_text_fetched_null 0 \nproto_text_fetched_bit 0 \nproto_text_fetched_tinyint 0 \nproto_text_fetched_short 0 \nproto_text_fetched_int24 0 \nproto_text_fetched_int 0 \nproto_text_fetched_bigint 0 \nproto_text_fetched_decimal 0 \nproto_text_fetched_float 0 \nproto_text_fetched_double 0 \nproto_text_fetched_date 0 \nproto_text_fetched_year 0 \nproto_text_fetched_time 0 \nproto_text_fetched_datetime 0 \nproto_text_fetched_timestamp 0 \nproto_text_fetched_string 0 \nproto_text_fetched_blob 0 \nproto_text_fetched_enum 0 \nproto_text_fetched_set 0 \nproto_text_fetched_geometry 0 \nproto_text_fetched_other 0 \nproto_binary_fetched_null 0 \nproto_binary_fetched_bit 0 \nproto_binary_fetched_tinyint 0 \nproto_binary_fetched_short 0 \nproto_binary_fetched_int24 0 \nproto_binary_fetched_int 0 \nproto_binary_fetched_bigint 0 \nproto_binary_fetched_decimal 0 \nproto_binary_fetched_float 0 \nproto_binary_fetched_double 0 \nproto_binary_fetched_date 0 \nproto_binary_fetched_year 0 \nproto_binary_fetched_time 0 \nproto_binary_fetched_datetime 0 \nproto_binary_fetched_timestamp 0 \nproto_binary_fetched_string 0 \nproto_binary_fetched_blob 0 \nproto_binary_fetched_enum 0 \nproto_binary_fetched_set 0 \nproto_binary_fetched_geometry 0 \nproto_binary_fetched_other 0 \ninit_command_executed_count 0 \ninit_command_failed_count 0 \ncom_quit 0 \ncom_init_db 0 \ncom_query 0 \ncom_field_list 0 \ncom_create_db 0 \ncom_drop_db 0 \ncom_refresh 0 \ncom_shutdown 0 \ncom_statistics 0 \ncom_process_info 0 \ncom_connect 0 \ncom_process_kill 0 \ncom_debug 0 \ncom_ping 0 \ncom_time 0 \ncom_delayed_insert 0 \ncom_change_user 0 \ncom_binlog_dump 0 \ncom_table_dump 0 \ncom_connect_out 0 \ncom_register_slave 0 \ncom_stmt_prepare 0 \ncom_stmt_execute 0 \ncom_stmt_send_long_data 0 \ncom_stmt_close 0 \ncom_stmt_reset 0 \ncom_stmt_set_option 0 \ncom_stmt_fetch 0 \ncom_deamon 0 \nbytes_received_real_data_normal 0 \nbytes_received_real_data_ps 0 \n
\n
\nexample statistics \nstat1 0 \nstat2 0 \n
\n
\n
\nODBC Support enabled \nActive Persistent Links 0 \nActive Links 0 \nODBC library Win32 \n
\n
\nDirective Local Value Master Value \nodbc.allow_persistent On On \nodbc.check_persistent On On \nodbc.default_cursortype Static cursor Static cursor \nodbc.default_db no value no value \nodbc.default_pw no value no value \nodbc.default_user no value no value \nodbc.defaultbinmode return as is return as is \nodbc.defaultlrl return up to 4096 bytes return up to 4096 bytes \nodbc.max_links Unlimited Unlimited \nodbc.max_persistent Unlimited Unlimited \n
\n
\n
\nOpenSSL support enabled \nOpenSSL Library Version OpenSSL 0.9.8zf 19 Mar 2015 \nOpenSSL Header Version OpenSSL 0.9.8zb 6 Aug 2014 \n
\n
\n
\nPCRE (Perl Compatible Regular Expressions) Support enabled \nPCRE Library Version 8.37 2015-04-28 \n
\n
\nDirective Local Value Master Value \npcre.backtrack_limit 1000000 1000000 \npcre.recursion_limit 100000 100000 \n
\n
\n
\nPDO support enabled \nPDO drivers mysql, odbc, sqlite \n
\n
\n
\nPDO Driver for MySQL enabled \nClient API version mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $ \n
\n
\n
\nPDO Driver for ODBC (Win32) enabled \nODBC Connection Pooling Enabled, strict matching \n
\n
\n
\nPDO Driver for SQLite 3.x enabled \nSQLite Library 3.7.7.1 \n
\n
\n
\nPhar: PHP Archive support enabled \nPhar EXT version 2.0.1 \nPhar API version 1.1.1 \nSVN revision $Id: ba734629367f9671b25202408d13914fa63d8396 $ \nPhar-based phar archives enabled \nTar-based phar archives enabled \nZIP-based phar archives enabled \ngzip compression enabled \nbzip2 compression enabled \nOpenSSL 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
\nDirective Local Value Master Value \nphar.cache_list no value no value \nphar.readonly On On \nphar.require_hash On On \n
\n
\n
\nReflection enabled \nVersion $Id: f6367cdb4e3f392af4a6d441a6641de87c2e50c4 $ \n
\n
\n
\nSession Support enabled \nRegistered save handlers files user \nRegistered serializer handlers php php_binary wddx \n
\n
\nDirective Local Value Master Value \nsession.auto_start Off Off \nsession.cache_expire 180 180 \nsession.cache_limiter nocache nocache \nsession.cookie_domain no value no value \nsession.cookie_httponly Off Off \nsession.cookie_lifetime 0 0 \nsession.cookie_path / / \nsession.cookie_secure Off Off \nsession.entropy_file no value no value \nsession.entropy_length 0 0 \nsession.gc_divisor 1000 1000 \nsession.gc_maxlifetime 1440 1440 \nsession.gc_probability 1 1 \nsession.hash_bits_per_character 5 5 \nsession.hash_function 0 0 \nsession.name PHPSESSID PHPSESSID \nsession.referer_check no value no value \nsession.save_handler files files \nsession.save_path E:\\software\\phpstudy\\tmp\\tmp E:\\software\\phpstudy\\tmp\\tmp \nsession.serialize_handler php php \nsession.upload_progress.cleanup On On \nsession.upload_progress.enabled On On \nsession.upload_progress.freq 1% 1% \nsession.upload_progress.min_freq 1 1 \nsession.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS \nsession.upload_progress.prefix upload_progress_ upload_progress_ \nsession.use_cookies On On \nsession.use_only_cookies On On \nsession.use_trans_sid 0 0 \n
\n
\n
\nSimplexml support enabled \nRevision $Id: 16070fc92ad6f69cebb2d52ad3f02794f833ce39 $ \nSchema support enabled \n
\n
\n
\nSockets Support enabled \n
\n
\n
\nSPL support enabled \nInterfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject \nClasses 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
\n
\n
\nSQLite3 support enabled \nSQLite3 module version 0.7 \nSQLite Library 3.7.7.1 \n
\n
\nDirective Local Value Master Value \nsqlite3.extension_dir no value no value \n
\n
\n
\nDynamic Library Support enabled \nPath to sendmail no value \n
\n
\nDirective Local Value Master Value \nassert.active 1 1 \nassert.bail 0 0 \nassert.callback no value no value \nassert.quiet_eval 0 0 \nassert.warning 1 1 \nauto_detect_line_endings 0 0 \ndefault_socket_timeout 60 60 \nfrom no value no value \nurl_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry \nuser_agent no value no value \n
\n
\n
\nTokenizer Support enabled \n
\n
\n
\nWDDX Support enabled \nWDDX Session Serializer enabled \n
\n
\n
\nXML Support active \nXML Namespace Support active \nlibxml2 Version 2.7.8 \n
\n
\n
\n
\n
\ncore library version xmlrpc-epi v. 0.51 \nphp extension version 0.51 \nauthor Dan Libby \nhomepage http://xmlrpc-epi.sourceforge.net \nopen sourced by Epinions.com \n
\n
\n
\n
\n
\nXSL enabled \nlibxslt Version 1.1.27 \nlibxslt compiled against libxml Version 2.7.8 \nEXSLT enabled \nlibexslt Version 0.8.16 \n
\n
\n
\nZend Guard Loader enabled \nLicense Path no value \nObfuscation level 3 \n
\n
\n
\nZip enabled \nExtension Version $Id: 6c872ebfb022206b0cc2a183c7a388c7b6ad8685 $ \nZip version 1.11.0 \nLibzip version 0.10.1 \n
\n
\n
\nZLib Support enabled \nStream Wrapper compress.zlib:// \nStream Filter zlib.inflate, zlib.deflate \nCompiled Version 1.2.7 \nLinked Version 1.2.7 \n
\n
\nDirective Local Value Master Value \nzlib.output_compression Off Off \nzlib.output_compression_level -1 -1 \nzlib.output_handler no value no value \n
\n
Additional Modules \n
\n
Environment \n
\nVariable Value \nPATH \nSYSTEMROOT C:\\Windows \nCOMSPEC C:\\Windows\\system32\\cmd.exe \nPATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC \nWINDIR C:\\Windows \nPHP_FCGI_MAX_REQUESTS 1000 \nPHPRC E:/software/phpstudy/php/php-5.4.45-nts/ \n_FCGI_SHUTDOWN_EVENT_ 1988 \n
\n
PHP Variables \n
\nVariable Value \n_REQUEST["key"] value \n_COOKIE["key"] value \n_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 \n_SERVER["SYSTEMROOT"] C:\\Windows \n_SERVER["COMSPEC"] C:\\Windows\\system32\\cmd.exe \n_SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC \n_SERVER["WINDIR"] C:\\Windows \n_SERVER["PHP_FCGI_MAX_REQUESTS"] 1000 \n_SERVER["PHPRC"] E:/software/phpstudy/php/php-5.4.45-nts/ \n_SERVER["_FCGI_SHUTDOWN_EVENT_"] 1988 \n_SERVER["HTTP_CONNECTION"] close \n_SERVER["SCRIPT_NAME"] /phpinfo.php \n_SERVER["REQUEST_URI"] /phpinfo.php \n_SERVER["QUERY_STRING"] no value \n_SERVER["REQUEST_METHOD"] GET \n_SERVER["SERVER_PROTOCOL"] HTTP/1.1 \n_SERVER["GATEWAY_INTERFACE"] CGI/1.1 \n_SERVER["REMOTE_PORT"] 53146 \n_SERVER["SCRIPT_FILENAME"] E:/software/phpstudy/WWW/phpinfo.php \n_SERVER["SERVER_ADMIN"] admin@phpStudy.net \n_SERVER["CONTEXT_DOCUMENT_ROOT"] E:/software/phpstudy/WWW \n_SERVER["CONTEXT_PREFIX"] no value \n_SERVER["REQUEST_SCHEME"] http \n_SERVER["DOCUMENT_ROOT"] E:/software/phpstudy/WWW \n_SERVER["REMOTE_ADDR"] ::1 \n_SERVER["SERVER_PORT"] 808 \n_SERVER["SERVER_ADDR"] ::1 \n_SERVER["SERVER_NAME"] localhost \n_SERVER["SERVER_SOFTWARE"] Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9 \n_SERVER["SERVER_SIGNATURE"] no value \n_SERVER["SystemRoot"] C:\\Windows \n_SERVER["HTTP_ACCEPT_ENCODING"] gzip \n_SERVER["HTTP_COOKIE"] key=value \n_SERVER["CONTENT_TYPE"] text/plain \n_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 \n_SERVER["HTTP_HOST"] localhost:808 \n_SERVER["FCGI_ROLE"] RESPONDER \n_SERVER["PHP_SELF"] /phpinfo.php \n_SERVER["REQUEST_TIME_FLOAT"] 1575984761.036 \n_SERVER["REQUEST_TIME"] 1575984761 \n
\n
PHP License \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
\nThis 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
\nIf 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
\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
\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" ::只输出文件名,不输出扩展名
--------------------------------------------------------------------------------