From 786df87bdcfb0d1dec4b0adeeff04aff9322747d Mon Sep 17 00:00:00 2001 From: Jing Ling Date: Sat, 22 Aug 2020 01:25:57 +0800 Subject: [PATCH] typos --- modules/check/axfr.py | 15 ++++++--------- modules/check/cdx.py | 13 +++++-------- modules/check/cert.py | 12 ++++++------ modules/check/csp.py | 10 +++++----- modules/check/nsec.py | 10 +++++----- modules/check/robots.py | 11 ++++------- modules/check/sitemap.py | 11 ++++------- 7 files changed, 35 insertions(+), 47 deletions(-) diff --git a/modules/check/axfr.py b/modules/check/axfr.py index 4ff8ca5..5b33d12 100644 --- a/modules/check/axfr.py +++ b/modules/check/axfr.py @@ -11,18 +11,15 @@ import dns.resolver import dns.zone from common import utils -from common.module import Module +from common.check import Check from config.log import logger -class CheckAXFR(Module): - """ - DNS zone transfer vulnerability base class - """ - def __init__(self, domain: str): - Module.__init__(self) +class AXFR(Check): + def __init__(self, domain): + Check.__init__(self) self.domain = domain - self.module = 'Check' + self.module = 'check' self.source = 'AXFRCheck' self.results = [] @@ -91,7 +88,7 @@ def run(domain): :param str domain: 域名 """ - check = CheckAXFR(domain) + check = AXFR(domain) check.run() diff --git a/modules/check/cdx.py b/modules/check/cdx.py index 93e6538..ab3ea48 100644 --- a/modules/check/cdx.py +++ b/modules/check/cdx.py @@ -4,15 +4,12 @@ from common.check import Check -class CheckCDX(Check): - """ - 检查crossdomain.xml文件收集子域名 - """ - def __init__(self, domain: str): +class CrossDomain(Check): + def __init__(self, domain): Check.__init__(self) self.domain = domain - self.module = 'Check' - self.source = "CrossDomainXml" + self.module = 'check' + self.source = "CrossDomainCheck" def check(self): """ @@ -39,7 +36,7 @@ def run(domain): :param domain: 域名 """ - check = CheckCDX(domain) + check = CrossDomain(domain) check.run() diff --git a/modules/check/cert.py b/modules/check/cert.py index 6c98b89..13b68b7 100644 --- a/modules/check/cert.py +++ b/modules/check/cert.py @@ -4,16 +4,16 @@ import socket import ssl -from common.module import Module from config.log import logger +from common.check import Check -class CheckCert(Module): +class CertInfo(Check): def __init__(self, domain): - Module.__init__(self) + Check.__init__(self) self.domain = domain - self.port = 443 # ssl port - self.module = 'Check' + self.port = 443 + self.module = 'check' self.source = 'CertInfo' def check(self): @@ -50,7 +50,7 @@ def run(domain): :param str domain: 域名 """ - check = CheckCert(domain) + check = CertInfo(domain) check.run() diff --git a/modules/check/csp.py b/modules/check/csp.py index 012fbe0..c61a935 100644 --- a/modules/check/csp.py +++ b/modules/check/csp.py @@ -3,19 +3,19 @@ Collect subdomains from ContentSecurityPolicy """ import requests -from common.check import Check from config.log import logger +from common.check import Check -class CheckCSP(Check): +class CSP(Check): """ Collect subdomains from ContentSecurityPolicy """ def __init__(self, domain, header): Check.__init__(self) self.domain = domain - self.module = 'Check' - self.source = 'ContentSecurityPolicy' + self.module = 'check' + self.source = 'CSPCheck' self.csp_header = header def grab_header(self): @@ -72,7 +72,7 @@ def run(domain, header=None): :param str domain: 域名 :param dict or None header: 响应头 """ - check = CheckCSP(domain, header) + check = CSP(domain, header) check.run() diff --git a/modules/check/nsec.py b/modules/check/nsec.py index 952b648..9c5be4e 100644 --- a/modules/check/nsec.py +++ b/modules/check/nsec.py @@ -1,16 +1,16 @@ # https://www.icann.org/resources/pages/dnssec-what-is-it-why-important-2019-03-20-zh # https://appsecco.com/books/subdomain-enumeration/active_techniques/zone_walking.html -from common.module import Module from common import utils +from common.check import Check -class CheckNSEC(Module): +class NSEC(Check): def __init__(self, domain): - Module.__init__(self) + Check.__init__(self) self.domain = domain self.module = 'check' - self.source = "CheckNSEC" + self.source = "NSECCheck" def walk(self): domain = self.domain @@ -47,7 +47,7 @@ def run(domain): :param str domain: 域名 """ - brute = CheckNSEC(domain) + brute = NSEC(domain) brute.run() diff --git a/modules/check/robots.py b/modules/check/robots.py index ee2239c..1b38c8f 100644 --- a/modules/check/robots.py +++ b/modules/check/robots.py @@ -4,15 +4,12 @@ from common.check import Check -class CheckRobots(Check): - """ - 检查robots.txt收集子域名 - """ +class Robots(Check): def __init__(self, domain): Check.__init__(self) self.domain = domain - self.module = 'Check' - self.source = 'Robots' + self.module = 'check' + self.source = 'RobotsCheck' def check(self): """ @@ -39,7 +36,7 @@ def run(domain): :param str domain: 域名 """ - check = CheckRobots(domain) + check = Robots(domain) check.run() diff --git a/modules/check/sitemap.py b/modules/check/sitemap.py index f8e064d..561e845 100644 --- a/modules/check/sitemap.py +++ b/modules/check/sitemap.py @@ -4,15 +4,12 @@ from common.check import Check -class CheckRobots(Check): - """ - 检查sitemap收集子域名 - """ +class Sitemap(Check): def __init__(self, domain): Check.__init__(self) self.domain = domain - self.module = 'Check' - self.source = 'Sitemap' + self.module = 'check' + self.source = 'SitemapCheck' def check(self): """ @@ -39,7 +36,7 @@ def run(domain): :param str domain: 域名 """ - check = CheckRobots(domain) + check = Sitemap(domain) check.run()