-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
executable file
·106 lines (89 loc) · 9.05 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# -*- coding: utf-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
# 开启 API 认证
AUTH = True
API_KEY = os.getenv('API_KEY', '123456')
"""
字典配置文件项
"""
DNS_SERVER = os.path.join(basedir, 'data/dns_server.txt')
CDN_JSON_PATH = os.path.join(basedir, 'data/cdn_info.json')
GEOIP_ASN = os.path.join(basedir, 'data/mmdb/GeoLite2-ASN.mmdb')
GEOIP_CITY = os.path.join(basedir, 'data/mmdb/GeoLite2-City.mmdb')
FILE_LEAK_DICT = os.path.join(basedir, 'data/web_path_file_fast.txt')
FILE_LEAK_TEST_DICT = os.path.join(basedir, 'data/web_path_file_test.txt')
DOMAIN_DICT_TEST = os.path.join(basedir, 'data/domain_name_test.txt')
DOMAIN_DICT_2W = os.path.join(basedir, 'data/domain_name.txt')
ALT_DNS_DICT_PATH = os.path.join(basedir, 'data/altdns_wordlist.txt')
BLACK_DOMAIN_PATH = os.path.join(basedir, 'data/black_domain.txt')
BLACK_HEXIE_PATH = os.path.join(basedir, 'data/black_hexie.txt')
WEB_APP_PATH = os.path.join(basedir, 'data/webapp.json')
WEB_FINGER_PATH = os.path.join(basedir, 'data/web_fingerprint.json')
OBSERVER_FINGER_PATH = os.path.join(basedir, 'data/web_fingerprint_v3.json')
"""
Mongo DB 数据库连接
"""
MONGO_HOST = os.getenv('MONGO_HOST', '127.0.0.1')
MONGO_PORT = os.getenv('MONGO_PORT', '27017')
MONGO_USER = os.getenv('MONGO_USER', 'admin')
MONGO_PWD = os.getenv('MONGO_PWD', '<mongo password>') # 避免特殊字符
MONGO_DB = os.getenv('MONGO_DB', 'assets')
MONGO_URL = f'mongodb://{MONGO_USER}:{MONGO_PWD}@{MONGO_HOST}:{MONGO_PORT}'
"""
CELERY 消息代理 Redis 配置
"""
REDIS_HOST = os.getenv('REDIS_HOST', '127.0.0.1')
REDIS_PORT = os.getenv('REDIS_PORT', '6379')
REDIS_PWD = os.getenv('REDIS_PWD', '<redis password>') # 避免特殊字符
REDIS_DB = os.getenv('REDIS_DB', '0')
CELERY_BROKER_URL = f'redis://:{REDIS_PWD}@{REDIS_HOST}:{REDIS_PORT}/{REDIS_DB}'
RESULT_BACKEND_URL = f'redis://:{REDIS_PWD}@{REDIS_HOST}:{REDIS_PORT}/{REDIS_DB}'
"""
DNS 域名搜集配置
"""
# 域名信息收集插件目录
DNS_SEARCH_PLUG_PATH = os.path.join(basedir, 'dns_search')
# 子域名最大长度
DOMAIN_MAX_LEN = 40
# 黑名单 -> 域名后缀
# FORBIDDEN_DOMAINS = ['gov.cn', 'edu.cn', 'org.cn']
FORBIDDEN_DOMAINS = []
"""
网络相关配置
"""
# 代理地址
PROXY_URL = ''
# PROXY_URL = '127.0.0.1:8080'
# 域名爆破并发数
DOMAIN_BRUTE_CONCURRENT = 300
# 组合生成的域名爆破并发数
ALT_DNS_CONCURRENT = 3500
# Observer 指纹扫描并发数
OBSERVER_CONCURRENT = 200
"""
API 接口配置
"""
FOFA_MAIL = os.getenv('FOFA_MAIL', 'NULL')
FOFA_KEY = os.getenv('FOFA_KEY', 'NULL')
QUAKE_TOKEN = os.getenv('QUAKE_TOKEN', 'NULL')
SHODAN_API = os.getenv('SHODAN_API', 'NULL')
# 奇安信付费接口按条数计费谨慎填写 Key
QAX_HUNTER_KEY = os.getenv('QAX_HUNTER_KEY', 'NULL')
# 接入国外 Hunter How 付费接口需要国外节点访问
HUNTER_KEY = os.getenv('HUNTER_KEY', 'NULL')
VIRUSTOTAL_KEY = os.getenv('VIRUSTOTAL_KEY', 'NULL')
ZOOMEYE_KEY = os.getenv('ZOOMEYE_KEY', 'NULL')
# DingTalk 默认通知群组
DINGTALK_TOKEN = 'NULL'
DINGTALK_SECRET = 'NULL'
"""
端口扫描配置
"""
# 不扫描 IP 段范围
BLACK_IPS = ['127.0.0.0/8', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '0.0.0.0/8']
# 常见 16 个 WEB 端口
TOP_10 = '80,443,8443,8080,8081,8888,8089,5000,5001,8085,800,81,9000,88,8001,8090'
# 高频渗透测试端口
TOP_100 = '80,443,8443,8080,8081,8888,8089,5000,5001,8085,800,81,9000,88,89,8001,8090,512,513,5632,4100,10003,10250,10255,10256,7700,21,22,23,25,20000,2601,2604,5168,10802,10803,4149,10808,3128,19000,1090,8777,1098,1099,82,83,84,85,86,8787,18000,7777,4200,8300,110,3700,7800,8830,6788,6789,1158,16010,139,15007,18080,18081,5800,18090,9900,2222,8886,8889,8381,8383,8388,8900,7878,210,5335,9443,3306,6378,6379,3311,4848,3312,8442,8700,55555,8600,777,5900,5901,4366,9999,10000,10001,7443,9494,9495,8988,8477,8989,52000,4899,805,8999,9001,6443,30000,9009,9010,8500,5432,15672,51000,3900,3389,8000,8002,2883,8003,8004,8006,2375,8008,22345,8009,29003,8010,8011,1352,2379,8012,20300,8016,50000,8018,9043,2900,9044,7000,7001,7002,7003,4444,4445,4440,7007,7008,5985,7010,28000,9060,10080,873,1900,50030,6000,6001,28017,1910,9080,9081,888,8060,5500,9090,389,27017,27018,9099,9100,30088,50060,8082,8083,8084,9109,50070,8086,8087,8088,1433,1434,8093,7070,8095,8601,8098,1443,8099,8100,7077,8103,7080,8618,8107,5551,5552,28080,5555,3000,5560,5050,445,6080,6082,455,8649,11211,49100,2003,1494,5601,8161,999,1000,1004,5100,8686,8688,1521,9200,8181,8182,7161,8188,8189,5631'
TOP_1000 = '1,3-4,6-7,9,13,17,19-26,30,32-33,37,42-43,49,53,68-70,79-85,88-90,99-100,106,109-111,113,119,125,135,139,143-144,146,161,163,179,199,211-212,222,254-256,259,264,280,301,306,311,340,366,389,406-407,416-417,425,427,443-445,458,464-465,481,497,500,512-515,524,541,543-546,548,554-555,563,587,593,616-617,623,625,631,636,646,648,666-668,683,687,691,700,705,711,714,720,722,726,749,765,777,783,787,800-801,808,843,873,880,888,898,900-903,911-912,981,987,990,992-993,995,999-1002,1007,1009-1011,1021-1100,1102,1104-1108,1110-1114,1117,1119,1121-1124,1126,1130-1132,1137-1138,1141,1145,1147-1149,1151-1152,1154,1163-1166,1169,1174-1175,1183,1185-1187,1192,1194,1198-1199,1201,1213,1216-1218,1233-1234,1236,1244,1247-1248,1259,1271-1272,1277,1287,1296,1300-1301,1309-1311,1322,1328,1334,1337,1352,1417,1433-1434,1443,1455,1461,1494,1500-1501,1503,1521,1524,1533,1556,1580,1583,1594,1600,1641,1658,1666-1667,1687-1688,1700,1717-1721,1723,1755,1761,1782-1783,1801,1805,1812,1839-1840,1862-1864,1875,1900,1914,1935,1947,1971-1972,1974,1984,1998-2010,2013,2020-2022,2030,2033-2035,2038,2040-2043,2045-2049,2065,2068,2099-2100,2103,2105-2107,2111,2119,2121,2126,2135,2144,2160-2161,2170,2179,2181,2190-2191,2196,2200,2222,2233,2251,2260,2288,2301,2323,2366,2375,2379,2381-2383,2393-2394,2399,2401,2443,2492,2500,2522,2525,2557,2601-2602,2604-2605,2607-2608,2638,2701-2702,2710,2717-2718,2725,2800,2809,2811,2869,2875,2888,2909-2910,2920,2967-2968,2998,3000-3001,3003,3005-3007,3011,3013,3017,3030-3031,3052,3071,3077,3128,3168,3211,3221,3260-3261,3268-3269,3283,3300-3301,3306,3322-3325,3333,3351,3367,3369-3372,3389-3390,3404,3476,3493,3517,3520,3527,3546,3551,3580,3659,3689-3690,3703,3737,3766,3772-3773,3784,3800-3801,3809,3814,3826-3828,3851,3869,3871,3878,3880,3888-3889,3905,3914,3918,3920,3945,3971,3986,3995,3998,4000-4006,4045,4111,4125-4126,4129,4224,4242,4279,4321,4343,4369,4443-4446,4449,4550,4560,4567,4662,4848,4899-4900,4998,5000-5004,5006,5009,5030,5033,5050-5051,5054,5060-5061,5080,5087,5100-5102,5111,5120,5151,5190,5200,5214,5221-5222,5225-5226,5269,5280,5298,5355,5357,5387,5405,5414,5431-5432,5440,5500,5510,5544,5550,5555,5560,5566,5601,5631-5633,5666,5672,5678-5679,5718,5722,5730,5800-5802,5810-5811,5815,5822,5825,5850,5859,5862,5877,5900-5904,5906-5907,5910-5911,5915,5922,5925,5950,5952,5959-5963,5987-5989,5998-6007,6009,6025,6059,6080,6093,6100-6101,6106,6112,6123,6129,6156,6161,6182,6346,6379,6389,6443,6502,6510,6543,6547,6565-6567,6580,6646,6666-6669,6689,6692,6699,6779,6788-6789,6792,6839,6881,6901,6969,7000-7008,7019,7025,7070,7100,7103,7106,7180,7182,7200-7201,7337,7402,7435,7443,7474,7496,7512,7625,7627,7676,7680,7687,7741,7777-7778,7800,7911,7920-7921,7937-7938,7999-8002,8007-8011,8016,8020-8022,8025,8030-8033,8040-8042,8045,8050,8060,8069-8070,8080-8091,8093,8099-8100,8123-8124,8161,8180-8181,8188,8192-8194,8200,8222,8254,8290-8292,8300,8333,8383,8400,8402,8443,8480-8481,8500,8600,8649,8651-8652,8654,8701,8744,8800,8873,8888-8889,8898-8899,8983,8989,8994,9000-9003,9009-9011,9040,9043,9050,9071,9080-9083,9090-9092,9094-9095,9099-9103,9110-9111,9200,9207,9220,9222,9290,9293,9300,9389,9391-9392,9415,9418,9443,9485,9500,9502-9503,9535,9575,9593-9595,9618,9666,9876-9878,9898,9900,9917,9929,9943-9944,9968,9987-9988,9994-10004,10009-10010,10012,10020,10024-10025,10030,10033,10050-10051,10080-10082,10101,10180,10215,10243,10250-10252,10255-10256,10566,10616-10617,10621,10626,10628-10629,10666,10778,11000-11001,11080,11110-11111,11211,11443,11967,12000,12174,12234,12265,12306,12345,12669,12750,12801-12804,12999,13456,13562,13722,13782-13783,14000,14238,14441-14442,15000,15002-15004,15660,15672,15742,16000-16001,16010,16012,16016,16018,16020,16030,16080,16113,16666,16992-16993,17877,17988,18040,18080,18089,18101,18988,19101,19283,19315,19350,19780,19801,19842,19888,19890,20000,20005-20006,20031,20221-20222,20828,20880,21000,21443,21571,22939,23502,24444,24800,25672,25734-25735,26214,27000,27017-27018,27352-27353,27355-27356,27715,28201,30000,30718,30951,31038,31337,32768-32785,33354,33899,34451,34528,34571-34573,35500,36359,37257,37310,38243,38292,38914,39297,40193,40654,40911,41084,41414,41511,42424,42510,43761,44176,44442-44443,44501,44838,45100,46675,48080,49152-49161,49163,49165-49167,49175-49176,49400,49664-49667,49670,49692,49697,49999-50003,50006,50010,50020,50070,50075,50090-50091,50095,50100,50105,50300,50389,50470,50475,50500,50636,50800,51103,51493,52673,52822,52848,52869,54045,54321,54328,54345,54485,54488,55055-55056,55555,55600,56341,56737-56738,57294,57797,58080,58316,60000,60010,60020,60030,60443,61532,61616,61900,62078,63331,64623,64680,65000,65129,65389,65512,6677,8484,8360,7080,41516,8880,8881,3505,1980,8003,8004,8006,8012,7890,86,8280,8028,9060,38501,38888,28017,8053,889,9085'