mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
去掉brute,valid字段
This commit is contained in:
@@ -607,7 +607,6 @@ class Brute(Module):
|
||||
ns_path = get_nameservers_path(self.enable_wildcard, ns_ip_list)
|
||||
|
||||
dict_set = self.gen_brute_dict(domain)
|
||||
dict_len = len(dict_set)
|
||||
|
||||
dict_name = f'generated_subdomains_{domain}_{timestring}.txt'
|
||||
dict_path = temp_dir.joinpath(dict_name)
|
||||
@@ -642,7 +641,7 @@ class Brute(Module):
|
||||
f'found {len(self.subdomains)} subdomains of {domain}')
|
||||
logger.log('DEBUG', f'{self.source} module found subdomains of {domain}:\n'
|
||||
f'{self.subdomains}')
|
||||
self.gen_result(brute=dict_len, valid=len(self.subdomains))
|
||||
self.gen_result()
|
||||
self.save_db()
|
||||
return self.subdomains
|
||||
|
||||
|
||||
+4
-8
@@ -83,9 +83,7 @@ class Database(object):
|
||||
f'module text,'
|
||||
f'source text,'
|
||||
f'elapse float,'
|
||||
f'find int,'
|
||||
f'brute int,'
|
||||
f'valid int)')
|
||||
f'find int)')
|
||||
|
||||
def save_db(self, table_name, results, module_name=None):
|
||||
"""
|
||||
@@ -104,13 +102,12 @@ class Database(object):
|
||||
f'insert into "{table_name}" (id, alive, resolve, request, new,'
|
||||
f'url, subdomain, port, level, cname, content, public, cdn, status,'
|
||||
f'reason, title, banner, header, response, times, ttl, cidr, asn, org,'
|
||||
f' ip2region, ip2location, resolver, module, source, elapse, find,'
|
||||
f'brute, valid) '
|
||||
f' ip2region, ip2location, resolver, module, source, elapse, find) '
|
||||
f'values (:id, :alive, :resolve, :request, :new, :url, '
|
||||
f':subdomain, :port, :level, :cname, :content, :public, :cdn, :status,'
|
||||
f':reason, :title, :banner, :header, :response, :times, :ttl, :cidr,'
|
||||
f':asn, :org, :ip2region, :ip2location, :resolver, :module, :source,'
|
||||
f':elapse, :find, :brute, :valid)', results)
|
||||
f':elapse, :find)', results)
|
||||
except Exception as e:
|
||||
logger.log('ERROR', e)
|
||||
|
||||
@@ -232,8 +229,7 @@ class Database(object):
|
||||
table_name = table_name.replace('.', '_')
|
||||
query = f'select id, new, alive, request, resolve, url, subdomain, level,' \
|
||||
f'cname, content, public, cdn, port, status, reason, title, banner,' \
|
||||
f'times, ttl, cidr, asn, org, ip2region, ip2location, resolver, module,' \
|
||||
f'source, elapse, find, brute, valid from "{table_name}"'
|
||||
f'cidr, asn, org, ip2region, ip2location, source from "{table_name}"'
|
||||
if alive and limit:
|
||||
if limit in ['resolve', 'request']:
|
||||
where = f' where {limit} = 1'
|
||||
|
||||
+3
-7
@@ -247,7 +247,7 @@ class Module(object):
|
||||
json.dump(result, file, ensure_ascii=False, indent=4)
|
||||
return True
|
||||
|
||||
def gen_result(self, find=0, brute=None, valid=0):
|
||||
def gen_result(self):
|
||||
"""
|
||||
Generate results
|
||||
"""
|
||||
@@ -284,9 +284,7 @@ class Module(object):
|
||||
'module': self.module,
|
||||
'source': self.source,
|
||||
'elapse': self.elapse,
|
||||
'find': find,
|
||||
'brute': brute,
|
||||
'valid': valid}
|
||||
'find': None}
|
||||
self.results.append(result)
|
||||
else:
|
||||
for subdomain in self.subdomains:
|
||||
@@ -336,9 +334,7 @@ class Module(object):
|
||||
'module': self.module,
|
||||
'source': self.source,
|
||||
'elapse': self.elapse,
|
||||
'find': find,
|
||||
'brute': brute,
|
||||
'valid': valid}
|
||||
'find': len(self.subdomains)}
|
||||
self.results.append(result)
|
||||
|
||||
def save_db(self):
|
||||
|
||||
+1
-9
@@ -104,12 +104,4 @@ ip2location库查询出的物理地址
|
||||
|
||||
### find
|
||||
|
||||
当前子域名收集模块找到子域的个数
|
||||
|
||||
### brute
|
||||
|
||||
爆破枚举子域名时所用的字典大小
|
||||
|
||||
### valid
|
||||
|
||||
爆破枚举子域名时中发现的有效子域个数
|
||||
当前模块发现的子域个数
|
||||
Reference in New Issue
Block a user