This commit is contained in:
Jing Ling
2020-08-22 01:25:57 +08:00
parent 6af40c553e
commit 786df87bdc
7 changed files with 35 additions and 47 deletions
+6 -9
View File
@@ -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()
+5 -8
View File
@@ -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()
+6 -6
View File
@@ -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()
+5 -5
View File
@@ -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()
+5 -5
View File
@@ -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()
+4 -7
View File
@@ -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()
+4 -7
View File
@@ -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()