mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-25 00:56:14 +08:00
typos
This commit is contained in:
@@ -13,7 +13,9 @@ from config import settings
|
|||||||
HEADERS = {
|
HEADERS = {
|
||||||
"Accept": "application/json, text/javascript, */*; q=0.01",
|
"Accept": "application/json, text/javascript, */*; q=0.01",
|
||||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36",
|
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) "
|
||||||
|
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||||
|
"Chrome/63.0.3239.84 Safari/537.36",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -73,8 +75,9 @@ def github_takeover(url):
|
|||||||
},
|
},
|
||||||
"content": cname_url64
|
"content": cname_url64
|
||||||
}
|
}
|
||||||
html_url = 'https://api.github.com/repos/' + user + '/' + repo_name + '/contents/index.html'
|
base_url = 'https://api.github.com/repos/'
|
||||||
url_url = 'https://api.github.com/repos/' + user + '/' + repo_name + '/contents/CNAME'
|
html_url = base_url + user + '/' + repo_name + '/contents/index.html'
|
||||||
|
url_url = base_url + user + '/' + repo_name + '/contents/CNAME'
|
||||||
html_r = requests.put(url=html_url, data=json.dumps(html_dict),
|
html_r = requests.put(url=html_url, data=json.dumps(html_dict),
|
||||||
headers=headers) # 上传index.html
|
headers=headers) # 上传index.html
|
||||||
cname_r = requests.put(url=url_url, data=json.dumps(url_dict),
|
cname_r = requests.put(url=url_url, data=json.dumps(url_dict),
|
||||||
|
|||||||
+2
-2
@@ -388,8 +388,8 @@ class Condition(object):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
name = []
|
name = []
|
||||||
while self.index < len(
|
while self.index < len(self.condstr) and self.condstr[self.index] \
|
||||||
self.condstr) and self.condstr[self.index] in self.allow_character:
|
in self.allow_character:
|
||||||
name.append(self.condstr[self.index])
|
name.append(self.condstr[self.index])
|
||||||
self.index += 1
|
self.index += 1
|
||||||
|
|
||||||
|
|||||||
@@ -33,14 +33,16 @@ class CheckAXFR(Module):
|
|||||||
|
|
||||||
:param server: domain server
|
:param server: domain server
|
||||||
"""
|
"""
|
||||||
logger.log('DEBUG', f'Trying to perform domain transfer in {server} of {self.domain}')
|
logger.log('DEBUG', f'Trying to perform domain transfer in {server} '
|
||||||
|
f'of {self.domain}')
|
||||||
try:
|
try:
|
||||||
xfr = dns.query.xfr(where=server, zone=self.domain,
|
xfr = dns.query.xfr(where=server, zone=self.domain,
|
||||||
timeout=5.0, lifetime=10.0)
|
timeout=5.0, lifetime=10.0)
|
||||||
zone = dns.zone.from_xfr(xfr)
|
zone = dns.zone.from_xfr(xfr)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.log('DEBUG', e.args)
|
logger.log('DEBUG', e.args)
|
||||||
logger.log('DEBUG', f'Domain transfer to server {server} of {self.domain} failed')
|
logger.log('DEBUG', f'Domain transfer to server {server} of '
|
||||||
|
f'{self.domain} failed')
|
||||||
return
|
return
|
||||||
names = zone.nodes.keys()
|
names = zone.nodes.keys()
|
||||||
for name in names:
|
for name in names:
|
||||||
@@ -50,7 +52,8 @@ class CheckAXFR(Module):
|
|||||||
record = zone[name].to_text(name)
|
record = zone[name].to_text(name)
|
||||||
self.results.append(record)
|
self.results.append(record)
|
||||||
if self.results:
|
if self.results:
|
||||||
logger.log('DEBUG', f'Found the domain transfer record of {self.domain} on {server}')
|
logger.log('DEBUG', f'Found the domain transfer record of '
|
||||||
|
f'{self.domain} on {server}')
|
||||||
logger.log('DEBUG', '\n'.join(self.results))
|
logger.log('DEBUG', '\n'.join(self.results))
|
||||||
self.results = []
|
self.results = []
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ class CheckNSEC(Module):
|
|||||||
subdomains = self.match_subdomains(record)
|
subdomains = self.match_subdomains(record)
|
||||||
subdomain = ''.join(subdomains) # 其实这里的subdomains的长度为1 也就是说只会有一个子域
|
subdomain = ''.join(subdomains) # 其实这里的subdomains的长度为1 也就是说只会有一个子域
|
||||||
self.subdomains.update(subdomains)
|
self.subdomains.update(subdomains)
|
||||||
self.gen_record(subdomains, record)
|
|
||||||
if subdomain == self.domain: # 当查出子域为主域 说明完成了一个循环 不再继续查询
|
if subdomain == self.domain: # 当查出子域为主域 说明完成了一个循环 不再继续查询
|
||||||
break
|
break
|
||||||
domain = subdomain
|
domain = subdomain
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ class ArchiveCrawl(Crawl):
|
|||||||
for resp in cdx.iter(url, limit=limit):
|
for resp in cdx.iter(url, limit=limit):
|
||||||
if resp.data.get('status') not in ['301', '302']:
|
if resp.data.get('status') not in ['301', '302']:
|
||||||
url = resp.data.get('url')
|
url = resp.data.get('url')
|
||||||
subdomains = self.match_subdomains(self.get_maindomain(domain),
|
subdomains = self.match_subdomains(domain, url + resp.text)
|
||||||
url + resp.text)
|
|
||||||
self.subdomains.update(subdomains)
|
self.subdomains.update(subdomains)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class CommonCrawl(Crawl):
|
|||||||
|
|
||||||
for resp in tqdm(cdx.iter(url, limit=limit), total=limit):
|
for resp in tqdm(cdx.iter(url, limit=limit), total=limit):
|
||||||
if resp.data.get('status') not in ['301', '302']:
|
if resp.data.get('status') not in ['301', '302']:
|
||||||
subdomains = self.match_subdomains(self.get_maindomain(domain), resp.text)
|
subdomains = self.match_subdomains(domain, resp.text)
|
||||||
self.subdomains.update(subdomains)
|
self.subdomains.update(subdomains)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ class BruteSRV(Module):
|
|||||||
record = str(item)
|
record = str(item)
|
||||||
subdomains = self.match_subdomains(record)
|
subdomains = self.match_subdomains(record)
|
||||||
self.subdomains.update(subdomains)
|
self.subdomains.update(subdomains)
|
||||||
self.gen_record(subdomains, record)
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
+2
-2
@@ -102,8 +102,8 @@ def filter_name(path, black_name):
|
|||||||
if path.endswith(name):
|
if path.endswith(name):
|
||||||
return True
|
return True
|
||||||
black_ext = ['io.js', 'ui.js', 'fp.js', 'en.js', 'en-us,js', 'zh.js', 'zh-cn.js',
|
black_ext = ['io.js', 'ui.js', 'fp.js', 'en.js', 'en-us,js', 'zh.js', 'zh-cn.js',
|
||||||
'zh_cn.js', 'dev.js', 'min.js', 'umd.js', 'esm.js', 'all.js', 'cjs.js', 'prod.js',
|
'zh_cn.js', 'dev.js', 'min.js', 'umd.js', 'esm.js', 'all.js', 'cjs.js',
|
||||||
'slim.js', 'core.js', 'global.js', 'bundle.js', 'browser.js',
|
'prod.js', 'slim.js', 'core.js', 'global.js', 'bundle.js', 'browser.js',
|
||||||
'brands.js', 'simple.js', 'common.js', 'development.js', 'banner.js',
|
'brands.js', 'simple.js', 'common.js', 'development.js', 'banner.js',
|
||||||
'production.js']
|
'production.js']
|
||||||
for ext in black_ext:
|
for ext in black_ext:
|
||||||
|
|||||||
Reference in New Issue
Block a user