bbot 2.7.1.7207rc0__py3-none-any.whl → 2.7.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bbot might be problematic. Click here for more details.

bbot/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # version placeholder (replaced by poetry-dynamic-versioning)
2
- __version__ = "v2.7.1.7207rc"
2
+ __version__ = "v2.7.2"
3
3
 
4
4
  from .scanner import Scanner, Preset
5
5
 
@@ -1,4 +1,4 @@
1
- import re
1
+ import json
2
2
 
3
3
  from bbot.modules.templates.subdomain_enum import subdomain_enum
4
4
 
@@ -15,78 +15,61 @@ class dnsdumpster(subdomain_enum):
15
15
 
16
16
  base_url = "https://dnsdumpster.com"
17
17
 
18
+ async def setup(self):
19
+ self.apikey_regex = self.helpers.re.compile(r'<form[^>]*data-form-id="mainform"[^>]*hx-headers=\'([^\']*)\'')
20
+ return True
21
+
18
22
  async def query(self, domain):
19
23
  ret = []
20
- # first, get the CSRF tokens
24
+ # first, get the JWT token from the main page
21
25
  res1 = await self.api_request(self.base_url)
22
26
  status_code = getattr(res1, "status_code", 0)
23
- if status_code in [429]:
24
- self.verbose(f'Too many requests "{status_code}"')
25
- return ret
26
- elif status_code not in [200]:
27
+ if status_code not in [200]:
27
28
  self.verbose(f'Bad response code "{status_code}" from DNSDumpster')
28
29
  return ret
29
- else:
30
- self.debug(f'Valid response code "{status_code}" from DNSDumpster')
31
-
32
- html = self.helpers.beautifulsoup(res1.content, "html.parser")
33
- if html is False:
34
- self.verbose("BeautifulSoup returned False")
35
- return ret
36
30
 
37
- csrftoken = None
38
- csrfmiddlewaretoken = None
31
+ # Extract JWT token from the form's hx-headers attribute using regex
32
+ jwt_token = None
39
33
  try:
40
- for cookie in res1.headers.get("set-cookie", "").split(";"):
41
- try:
42
- k, v = cookie.split("=", 1)
43
- except ValueError:
44
- self.verbose("Error retrieving cookie")
45
- return ret
46
- if k == "csrftoken":
47
- csrftoken = str(v)
48
- csrfmiddlewaretoken = html.find("input", {"name": "csrfmiddlewaretoken"}).attrs.get("value", None)
49
- except AttributeError:
50
- pass
34
+ # Look for the form with data-form-id="mainform" and extract hx-headers
35
+ form_match = await self.helpers.re.search(self.apikey_regex, res1.text)
36
+ if form_match:
37
+ headers_json = form_match.group(1)
38
+ headers_data = json.loads(headers_json)
39
+ jwt_token = headers_data.get("Authorization")
40
+ except (AttributeError, json.JSONDecodeError, KeyError):
41
+ self.log.warning("Error obtaining JWT token")
42
+ return ret
51
43
 
52
- # Abort if we didn't get the tokens
53
- if not csrftoken or not csrfmiddlewaretoken:
54
- self.verbose("Error obtaining CSRF tokens")
44
+ # Abort if we didn't get the JWT token
45
+ if not jwt_token:
46
+ self.verbose("Error obtaining JWT token")
55
47
  self.errorState = True
56
48
  return ret
57
49
  else:
58
- self.debug("Successfully obtained CSRF tokens")
50
+ self.debug("Successfully obtained JWT token")
59
51
 
60
52
  if self.scan.stopping:
61
- return
53
+ return ret
62
54
 
63
- # Otherwise, do the needful
64
- subdomains = set()
55
+ # Query the API with the JWT token
65
56
  res2 = await self.api_request(
66
- f"{self.base_url}/",
57
+ "https://api.dnsdumpster.com/htmld/",
67
58
  method="POST",
68
- cookies={"csrftoken": csrftoken},
69
- data={
70
- "csrfmiddlewaretoken": csrfmiddlewaretoken,
71
- "targetip": str(domain).lower(),
72
- "user": "free",
73
- },
59
+ data={"target": str(domain).lower()},
74
60
  headers={
75
- "origin": "https://dnsdumpster.com",
76
- "referer": "https://dnsdumpster.com/",
61
+ "Authorization": jwt_token,
62
+ "Content-Type": "application/x-www-form-urlencoded",
63
+ "Origin": "https://dnsdumpster.com",
64
+ "Referer": "https://dnsdumpster.com/",
65
+ "HX-Request": "true",
66
+ "HX-Target": "results",
67
+ "HX-Current-URL": "https://dnsdumpster.com/",
77
68
  },
78
69
  )
79
70
  status_code = getattr(res2, "status_code", 0)
80
71
  if status_code not in [200]:
81
- self.verbose(f'Bad response code "{status_code}" from DNSDumpster')
82
- return ret
83
- html = self.helpers.beautifulsoup(res2.content, "html.parser")
84
- if html is False:
85
- self.verbose("BeautifulSoup returned False")
72
+ self.verbose(f'Bad response code "{status_code}" from DNSDumpster API')
86
73
  return ret
87
- escaped_domain = re.escape(domain)
88
- match_pattern = re.compile(r"^[\w\.-]+\." + escaped_domain + r"$")
89
- for subdomain in html.findAll(text=match_pattern):
90
- subdomains.add(str(subdomain).strip().lower())
91
74
 
92
- return list(subdomains)
75
+ return await self.scan.extract_in_scope_hostnames(res2.text)
@@ -0,0 +1,31 @@
1
+ from bbot.modules.templates.gitlab import GitLabBaseModule
2
+
3
+
4
+ class gitlab_com(GitLabBaseModule):
5
+ watched_events = ["SOCIAL"]
6
+ produced_events = [
7
+ "CODE_REPOSITORY",
8
+ ]
9
+ flags = ["active", "safe", "code-enum"]
10
+ meta = {
11
+ "description": "Enumerate GitLab SaaS (gitlab.com/org) for projects and groups",
12
+ "created_date": "2024-03-11",
13
+ "author": "@TheTechromancer",
14
+ }
15
+
16
+ options = {"api_key": ""}
17
+ options_desc = {"api_key": "GitLab access token (for gitlab.com/org only)"}
18
+
19
+ # This is needed because we are consuming SOCIAL events, which aren't in scope
20
+ scope_distance_modifier = 2
21
+
22
+ async def handle_event(self, event):
23
+ await self.handle_social(event)
24
+
25
+ async def filter_event(self, event):
26
+ if event.data["platform"] != "gitlab":
27
+ return False, "platform is not gitlab"
28
+ _, domain = self.helpers.split_domain(event.host)
29
+ if domain not in self.saas_domains:
30
+ return False, "gitlab instance is not gitlab.com/org"
31
+ return True
@@ -0,0 +1,84 @@
1
+ from bbot.modules.templates.gitlab import GitLabBaseModule
2
+
3
+
4
+ class gitlab_onprem(GitLabBaseModule):
5
+ watched_events = ["HTTP_RESPONSE", "TECHNOLOGY", "SOCIAL"]
6
+ produced_events = [
7
+ "TECHNOLOGY",
8
+ "SOCIAL",
9
+ "CODE_REPOSITORY",
10
+ "FINDING",
11
+ ]
12
+ flags = ["active", "safe", "code-enum"]
13
+ meta = {
14
+ "description": "Detect self-hosted GitLab instances and query them for repositories",
15
+ "created_date": "2024-03-11",
16
+ "author": "@TheTechromancer",
17
+ }
18
+
19
+ # Optional GitLab access token (only required for gitlab.com, but still
20
+ # supported for on-prem installations that expose private projects).
21
+ options = {"api_key": ""}
22
+ options_desc = {"api_key": "GitLab access token (for self-hosted instances only)"}
23
+
24
+ # Allow accepting events slightly beyond configured max distance so we can
25
+ # discover repos on neighbouring infrastructure.
26
+ scope_distance_modifier = 2
27
+
28
+ async def handle_event(self, event):
29
+ if event.type == "HTTP_RESPONSE":
30
+ await self.handle_http_response(event)
31
+ elif event.type == "TECHNOLOGY":
32
+ await self.handle_technology(event)
33
+ elif event.type == "SOCIAL":
34
+ await self.handle_social(event)
35
+
36
+ async def filter_event(self, event):
37
+ # only accept out-of-scope SOCIAL events
38
+ if event.type == "HTTP_RESPONSE":
39
+ if event.scope_distance > self.scan.scope_search_distance:
40
+ return False, "event is out of scope distance"
41
+ elif event.type == "TECHNOLOGY":
42
+ if not event.data["technology"].lower().startswith("gitlab"):
43
+ return False, "technology is not gitlab"
44
+ if not self.helpers.is_ip(event.host) and self.helpers.tldextract(event.host).domain == "gitlab":
45
+ return False, "gitlab instance is not self-hosted"
46
+ elif event.type == "SOCIAL":
47
+ if event.data["platform"] != "gitlab":
48
+ return False, "platform is not gitlab"
49
+ _, domain = self.helpers.split_domain(event.host)
50
+ if domain in self.saas_domains:
51
+ return False, "gitlab instance is not self-hosted"
52
+ return True
53
+
54
+ async def handle_http_response(self, event):
55
+ """Identify GitLab servers from HTTP responses."""
56
+ headers = event.data.get("header", {})
57
+ if "x_gitlab_meta" in headers:
58
+ url = event.parsed_url._replace(path="/").geturl()
59
+ await self.emit_event(
60
+ {"host": str(event.host), "technology": "GitLab", "url": url},
61
+ "TECHNOLOGY",
62
+ parent=event,
63
+ context=f"{{module}} detected {{event.type}}: GitLab at {url}",
64
+ )
65
+ description = f"GitLab server at {event.host}"
66
+ await self.emit_event(
67
+ {"host": str(event.host), "description": description},
68
+ "FINDING",
69
+ parent=event,
70
+ context=f"{{module}} detected {{event.type}}: {description}",
71
+ )
72
+
73
+ async def handle_technology(self, event):
74
+ """Enumerate projects & groups once we know a host is GitLab."""
75
+ base_url = self.get_base_url(event)
76
+
77
+ # Projects owned by the authenticated user (or public projects if no
78
+ # authentication).
79
+ projects_url = self.helpers.urljoin(base_url, "api/v4/projects?simple=true")
80
+ await self.handle_projects_url(projects_url, event)
81
+
82
+ # Group enumeration.
83
+ groups_url = self.helpers.urljoin(base_url, "api/v4/groups?simple=true")
84
+ await self.handle_groups_url(groups_url, event)
@@ -0,0 +1,98 @@
1
+ from bbot.modules.base import BaseModule
2
+
3
+
4
+ class GitLabBaseModule(BaseModule):
5
+ """Common functionality for interacting with GitLab instances.
6
+
7
+ This template is intended to be inherited by two concrete modules:
8
+ 1. ``gitlab_com`` – Handles public SaaS instances (gitlab.com / gitlab.org).
9
+ 2. ``gitlab_onprem`` – Handles self-hosted, on-premises GitLab servers.
10
+
11
+ Both child modules share identical behaviour when talking to the GitLab
12
+ REST API; they only differ in which events they are willing to accept.
13
+ """
14
+
15
+ # domains owned by GitLab
16
+ saas_domains = ["gitlab.com", "gitlab.org"]
17
+
18
+ async def setup(self):
19
+ if self.options.get("api_key") is not None:
20
+ await self.require_api_key()
21
+ return True
22
+
23
+ async def handle_social(self, event):
24
+ """Enumerate projects belonging to a user or group profile."""
25
+ username = event.data.get("profile_name", "")
26
+ if not username:
27
+ return
28
+ base_url = self.get_base_url(event)
29
+ urls = [
30
+ # User-owned projects
31
+ self.helpers.urljoin(base_url, f"api/v4/users/{username}/projects?simple=true"),
32
+ # Group-owned projects
33
+ self.helpers.urljoin(base_url, f"api/v4/groups/{username}/projects?simple=true"),
34
+ ]
35
+ for url in urls:
36
+ await self.handle_projects_url(url, event)
37
+
38
+ async def handle_projects_url(self, projects_url, event):
39
+ for project in await self.gitlab_json_request(projects_url):
40
+ project_url = project.get("web_url", "")
41
+ if project_url:
42
+ code_event = self.make_event({"url": project_url}, "CODE_REPOSITORY", tags="git", parent=event)
43
+ await self.emit_event(
44
+ code_event,
45
+ context=f"{{module}} enumerated projects and found {{event.type}} at {project_url}",
46
+ )
47
+ namespace = project.get("namespace", {})
48
+ if namespace:
49
+ await self.handle_namespace(namespace, event)
50
+
51
+ async def handle_groups_url(self, groups_url, event):
52
+ for group in await self.gitlab_json_request(groups_url):
53
+ await self.handle_namespace(group, event)
54
+
55
+ async def gitlab_json_request(self, url):
56
+ """Helper that performs an HTTP request and safely returns JSON list."""
57
+ response = await self.api_request(url)
58
+ if response is not None:
59
+ try:
60
+ json_data = response.json()
61
+ except Exception:
62
+ return []
63
+ if json_data and isinstance(json_data, list):
64
+ return json_data
65
+ return []
66
+
67
+ async def handle_namespace(self, namespace, event):
68
+ namespace_name = namespace.get("path", "")
69
+ namespace_url = namespace.get("web_url", "")
70
+ namespace_path = namespace.get("full_path", "")
71
+
72
+ if not (namespace_name and namespace_url and namespace_path):
73
+ return
74
+
75
+ namespace_url = self.helpers.parse_url(namespace_url)._replace(path=f"/{namespace_path}").geturl()
76
+
77
+ social_event = self.make_event(
78
+ {
79
+ "platform": "gitlab",
80
+ "profile_name": namespace_path,
81
+ "url": namespace_url,
82
+ },
83
+ "SOCIAL",
84
+ parent=event,
85
+ )
86
+ await self.emit_event(
87
+ social_event,
88
+ context=f'{{module}} found GitLab namespace ({{event.type}}) "{namespace_name}" at {namespace_url}',
89
+ )
90
+
91
+ # ------------------------------------------------------------------
92
+ # Utility helpers
93
+ # ------------------------------------------------------------------
94
+ def get_base_url(self, event):
95
+ base_url = event.data.get("url", "")
96
+ if not base_url:
97
+ base_url = f"https://{event.host}"
98
+ return self.helpers.urlparse(base_url)._replace(path="/").geturl()
@@ -5,13 +5,11 @@ class TestDNSDumpster(ModuleTestBase):
5
5
  async def setup_after_prep(self, module_test):
6
6
  module_test.httpx_mock.add_response(
7
7
  url="https://dnsdumpster.com",
8
- headers={"Set-Cookie": "csrftoken=asdf"},
9
- content=b'<!DOCTYPE html>\n<html lang="en">\n <head>\n\n <meta charset="utf-8">\n <meta http-equiv="X-UA-Compatible" content="IE=edge">\n<meta name="google-site-verification" content="vAWNZCy-5XAPGRgA2_NY5HictfnByvgpqOLQUAmVZW0" />\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <meta name="description" content="Find dns records in order to identify the Internet footprint of an organization. Recon that enables deeper security assessments and discovery of the attack surface.">\n <meta name="author" content="">\n <link rel="icon" href="/static/favicon.ico">\n <title>DNSdumpster.com - dns recon and research, find and lookup dns records</title>\n\n\n <!-- Bootstrap core CSS -->\n <link href="/static/css/bootstrap.min.css" rel="stylesheet">\n <link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">\n\n <!-- Custom styles for this template -->\n <link href="/static/cover.css?v=1.4" rel="stylesheet">\n\n </head>\n\n <body>\n\n <div class="site-wrapper">\n <div class="site-wrapper-inner">\n<!-- Section 1 -->\n<section id="intro" data-speed="6" data-type="background">\n <div class="container">\n\n <div class="masthead clearfix">\n <div class="container inner">\n <nav>\n <ul class="nav masthead-nav">\n <li><a href="https://dnsdumpster.com/" data-toggle="tooltip" data-placement="bottom" title="Home"><i style="font-size: 1.2em;" class="fa fa-home"></i></a></li>\n <li><a href="/osint-network-defenders/" data-toggle="tooltip" data-placement="bottom" title="Defend"><i style="font-size: 1.2em;" class="fa fa-shield" aria-hidden="true"></i></a></li>\n <li><a href="/footprinting-reconnaissance/" data-placement="bottom" data-toggle="tooltip" title="Learn"><i style="font-size: 1.2em;" class="fa fa-mortar-board" aria-hidden="true"></i></a></li>\n <li><a href="https://hackertarget.com/" data-toggle="tooltip" title="Online Vulnerability Scanners"><i style="font-size: 1.2em; color: #00CC00;" class="fa fa-bullseye"></i></a></li>\n </ul>\n </nav>\n </div>\n </div>\n\n\n\n\n <div class="cover-container" style="max-width: 900px;">\n <div class="inner cover">\n <h1 class="cover-heading" style="margin-top: 100px;">dns recon & research, find & lookup dns records</h1>\n<p class="lead">\n<div id="hideform">\n<form role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="XYxKkbdJJrio6VMqowCdykwpM4mAflKkF9BcKFbLdmPbB3lwXArEVJvTPNpIz50l">\n <div class="form-group">\n<div class="col-md-2"></div><div class="col-md-6">\n\n<input class="form-control" type="text" placeholder="exampledomain.com" name="targetip" id="regularInput" autofocus>\n\n<input type="hidden" name="user" value="free">\n</div></div>\n<div align="left" id="formsubmit"><button type="submit" class="btn btn-default">Search <span class="glyphicon glyphicon-chevron-right"></span></button></div>\n</form></div></div>\n<div class="row"><div class="col-md-2"></div><div class="col-md-8">\n<div id="showloading" style="color: #fff;">Loading...<br>\n<div class="progress">\n<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 100%">\n</div></div></div></div></div></div>\n</P>\n\n<div class="row"><div class="col-md-12" style="padding: 80px;">\n\n</div></div>\n\n<p class="lead" style="margin-top: 40px; margin-bottom: 30px;">DNSdumpster.com is a FREE domain research tool that can discover hosts related to a domain. Finding visible hosts from the attackers perspective is an important part of the security assessment process.</p>\n\n </div>\n\n <p style="color: #777; margin-top: 40px;">this is a <a href="https://hackertarget.com/" title="Online Vulnerability Scanners"><button type="button" class="btn btn-danger btn-xs">HackerTarget.com</button></a> project</p>\n\n\n <div style="margin-top: 160px;" class="container">\n <div class="row">\n <div class="col-lg-12 text-center">\n <h2 class="section-heading text-uppercase"></h2>\n <h3 class="section-subheading text-muted">Open Source Intelligence for Networks</h3>\n </div>\n </div>\n <div style="margin-top: 30px;" class="row text-center">\n <div class="col-md-4">\n <span class="fa-stack fa-4x">\n <i class="fa fa-user-secret fa-stack-1x" style="color: #00CC00;"></i>\n </span>\n <h4 class="service-heading">Attack</h4>\n <p class="text-muted">The ability to quickly identify the attack surface is essential. Whether you are penetration testing or chasing bug bounties.</p>\n </div>\n <div class="col-md-4">\n <span class="fa-stack fa-4x">\n <i class="fa fa-shield fa-stack-1x" style="color: #00CC00;"></i>\n </span>\n <h4 class="service-heading">Defend</h4>\n <p class="text-muted">Network defenders benefit from passive reconnaissance in a number of ways. With analysis informing information security strategy.</p>\n </div>\n <div class="col-md-4">\n <span class="fa-stack fa-4x">\n <i class="fa fa-mortar-board fa-stack-1x" style="color: #00CC00;"></i>\n </span>\n <h4 class="service-heading">Learn</h4>\n <p class="text-muted">Understanding network based OSINT helps information technologists to better operate, assess and manage the network.</p>\n </div>\n </div>\n </div>\n\n\n\n\n <div class="container" style="background-color: #474747; margin-top: 180px; padding-bottom: 80px;"><div class="col-md-2"></div><div class="col-md-8">\n\n <span class="glyphicon glyphicon-trash" style="font-size: 4em; line-height: 5.5em;"></span>\n<p style="font-size: 1.7em; line-height: 1.9em; margin-bottom: 80px;">Map an organizations attack surface with a virtual <i>dumpster dive*</i> of the DNS records associated with the target organization.</p>\n<p style="font-size: 1.2em; color: #fff;">*DUMPSTER DIVING: The practice of sifting refuse from an office or technical installation to extract confidential data, especially security-compromising information.</p>\n</div> </div>\n\n\n<div class="container" style="text-align: left; margin-top: 80px; margin-bottom: 80px;">\n\n<h2 style="font-size: 1.8em;">Frequently Asked Questions</h2>\n\n<h4 style="margin-top: 30px;">How can I take my security assessments to the next level?</h4>\n\n<p>The company behind DNSDumpster is <a href="https://hackertarget.com/" title="Online Vulnerability Scanners">hackertarget.com</a> where we provide online hosted access to trusted open source security vulnerability scanners and network intelligence tools.</P><P>Save time and headaches by incorporating our attack surface discovery into your vulnerability assessment process.</p><P style="text-align: center; padding: 30px;"><a href="https://hackertarget.com/" title="HackerTarget.com | Online Security Testing and Open Source Intelligence"><img src="https://hackertarget.com/wp-content/uploads/2019/09/know-your-network-tools.png" alt="HackerTarget.com | Online Security Testing and Open Source Intelligence"></a></p>\n\n<h4>What data does DNSDumpster use?</h4>\n\n<p>No brute force subdomain enumeration is used as is common in dns recon tools that enumerate subdomains. We use open source intelligence resources to query for related domain data. It is then compiled into an actionable resource for both attackers and defenders of Internet facing systems.</P>\n<P>More than a simple <a href="https://hackertarget.com/dns-lookup/" title="Online DNS Lookup">DNS lookup</a> this tool will discover those hard to find sub-domains and web hosts. The search relies on data from our crawls of the Alexa Top 1 Million sites, Search Engines, Common Crawl, Certificate Transparency, Max Mind, Team Cymru, Shodan and <a href="https://scans.io/" style="text-decoration: underline;">scans.io</a>.</P>\n\n<h4>I have hit the host limit, do you have a PRO option?</h4>\n\n<P>Over at <a href="https://hackertarget.com/" title="Online Vulnerability Scanners">hackertarget.com</a> there\'s a tool we call <a href="https://hackertarget.com/domain-profiler/">domain profiler</a>. This compiles data similar to DNSDumpster; with additional data discovery. Queries available are based on the membership plan with the number of results (subdomains) being unlimited. With a STARTER membership you have access to the domain profiler tool for 12 months. Once the years membership expires you will revert to BASIC member status, however access to Domain Profiler and Basic Nmap scans continue. The BASIC access does not expire.</P>\n\n<h4>What are some other resources and tools for learning more?</h4>\n\n<P>There are some great open source recon frameworks that have been developed over the past couple of years. In addition tools such as <b>Metasploit</b> and <b>Nmap</b> include various modules for enumerating DNS. Check our <a href="https://dnsdumpster.com/footprinting-reconnaissance/">Getting Started with Footprinting</a> for more information.</P>\n\n</div>\n\n\n</div></div>\n</div></div>\n\n<footer>\n<div class="row" style="background-color: #1e1e1e; padding-top: 40px; padding-bottom: 20px;"><div class="container">\n<div class="col-md-6 col-sm-12 right-border" style="text-align: center;">\n<div class="footer-about" style="text-align: left; padding-left: 40px;">\n<h2 class="footer-title" style="font-size: 1.8em;">About</h2>\n<p style="margin-top: 20px;">At <a href="https://hackertarget.com/">hackertarget.com</a>, we have been scanning the Internet since 2007. Our vulnerability scanners now reach millions of IP addresses every year. We work to raise awareness of the value in open source security solutions.</p>\n</div>\n</div>\n<div class="col-md-6 col-sm-12">\n<div class="contact-info" style="text-align: left; padding-left: 40px;">\n<h2 class="footer-title" style="font-size: 1.8em;">Stay in Touch</h2>\n\n<div class="single">\n <p><i style="font-size: 1.2em;" class="fa fa-envelope"></i> dnsdumpster@gmail.com</p>\n</div>\n<div class="single">\n <p><i style="font-size: 1.2em;" class="fa fa-twitter"></i> <a href="https://twitter.com/hackertarget/">@hackertarget</a></p>\n</div>\n<!-- Begin MailChimp Signup Form -->\n<link href="https://cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css">\n<style type="text/css">\n #mc_embed_signup{background:#1e1e1e; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}\n /* Add your own MailChimp form style overrides in your site stylesheet or in this style block.\n We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */\n </style>\n <div id="mc_embed_signup">\n <form action="https://dnsdumpster.us17.list-manage.com/subscribe/post?u=3cbc62d931a69e74b2c856f1a&amp;id=532c46ab39" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>\n <div id="mc_embed_signup_scroll" style="text-align: left;">\n\n <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>\n <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->\n <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_3cbc62d931a69e74b2c856f1a_532c46ab39" tabindex="-1" value=""></div><br>\n <div class="clear" style="margin-top: 5px;"><input type="submit" style="background-color: #00CC00;" value="Subscribe to our List" name="subscribe" id="mc-embedded-subscribe" class="button"> <span style="font-size: 0.8em;">Low volume Updates and News</a></div>\n </div>\n </form>\n </div>\n\n <!--End mc_embed_signup-->\n\n</div>\n</div>\n</div>\n<div class="clearfix"></div>\n<div class="copyright" style="background-color: #1e1e1e; margin-top: 20px;">\n<p>Copyright &copy; 2023 Hacker Target Pty Ltd</p>\n</div>\n</div>\n</div>\n</div>\n</footer>\n </div>\n </div>\n </div>\n </div>\n\n\n\n\n</div></div>\n\n <!-- Bootstrap core JavaScript\n ================================================== -->\n <!-- Placed at the end of the document so the pages load faster -->\n <script src="https://dnsdumpster.com/static/js/jquery-1.12.4.min.js"></script>\n <script src="/static/js/bootstrap.min.js"></script>\n\n\n\n<script type="text/javascript">\n $(document).ready(function() {\n$(\'[data-toggle="tooltip"]\').tooltip({\'placement\': \'top\'});\n\n$("body").on(\'DOMSubtreeModified\', ".modal-content", function() {\n $(".modal-heading").hide();\n $(".modal-content").show();\n});\n\n $(\'body\').on(\'hidden.bs.modal\', \'.modal\', function () {\n $(this).removeData(\'bs.modal\');\n });\n\n }); //END $(document).ready()\n\n\n$(\'a.external\').on(\'click\', function(e) {\n e.preventDefault();\n $(".modal-heading").show();\n $(".modal-content").hide();\n\n\n var url = $(this).attr(\'href\');\n $(".modal-body").html(\'<iframe id="myiframe" style="background-color: #ccc;" width="100%" height="100%" frameborder="0" scrolling="yes" allowtransparency="true" src="\'+url+\'"></iframe>\');\n });\n\n \n\n\n $(\'#myModal\').on(\'show.bs.modal\', function () {\n $(this).find(\'.modal-dialog\').css({\n width:\'80%\', //choose your width\n height:\'80%\',\n \'padding\':\'5\'\n });\n $(this).find(\'.modal-content\').css({\n height:\'100%\',\n \'border-radius\':\'0\',\n \'padding\':\'15\'\n });\n $(this).find(\'.modal-body\').html(null);\n $(this).find(\'.modal-body\').css({\n width:\'auto\',\n height:\'100%\',\n \'padding\':\'5\'\n });\n })\n\n </script>\n\n<script>\n$(document).ready(function(){\n $("#showloading").hide();\n $("#formsubmit").click(function(){\n $("#hideform").hide();\n $("#showloading").show();\n });\n\n});\n</script>\n<!-- Google tag (gtag.js) -->\n<script async src="https://www.googletagmanager.com/gtag/js?id=G-FPGN9YXFNE"></script>\n<script>\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag(\'js\', new Date());\n\n gtag(\'config\', \'G-FPGN9YXFNE\');\n</script>\n </body>\n</html>\n',
8
+ content=b"""<form data-form-id="mainform" class="mb-6" hx-post="https://api.dnsdumpster.com/htmld/" hx-target="#results" hx-headers='{"Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjAsImlhdCI6MTc1OTAxODczOCwiZXhwIjoxNzU5MDE5NjM4LCJkYXRhIjoiZmMxMDcwOTVjYmRjN2Y5YjU1ZWJiM2ZlZGViNWQ5Y2M5MWU1NmEzNGEwYzliNzM5ZjRlYzg2Mjk4MmM0ZDI5YSIsIm1lbWJlcl9zdGF0dXMiOiJmcmVlIn0.7NWBC6TFSaDZH-_VKqDoXqv3nH4a1k30NUxrijg1KqI"}'><div class="form-group">""",
10
9
  )
11
10
  module_test.httpx_mock.add_response(
12
- url="https://dnsdumpster.com/",
13
- method="POST",
14
- content=b'<!DOCTYPE html>\n<html lang="en">\n <head>\n\n <meta charset="utf-8">\n <meta http-equiv="X-UA-Compatible" content="IE=edge">\n<meta name="google-site-verification" content="vAWNZCy-5XAPGRgA2_NY5HictfnByvgpqOLQUAmVZW0" />\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <meta name="description" content="Find dns records in order to identify the Internet footprint of an organization. Recon that enables deeper security assessments and discovery of the attack surface.">\n <meta name="author" content="">\n <link rel="icon" href="/static/favicon.ico">\n <title>DNSdumpster.com - dns recon and research, find and lookup dns records</title>\n\n\n <!-- Bootstrap core CSS -->\n <link href="/static/css/bootstrap.min.css" rel="stylesheet">\n <link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">\n\n <!-- Custom styles for this template -->\n <link href="/static/cover.css?v=1.4" rel="stylesheet">\n\n </head>\n\n <body>\n\n <div class="site-wrapper">\n <div class="site-wrapper-inner">\n<!-- Section 1 -->\n<section id="intro" data-speed="6" data-type="background">\n <div class="container">\n\n <div class="masthead clearfix">\n <div class="container inner">\n <nav>\n <ul class="nav masthead-nav">\n <li><a href="https://dnsdumpster.com/" data-toggle="tooltip" data-placement="bottom" title="Home"><i style="font-size: 1.2em;" class="fa fa-home"></i></a></li>\n <li><a href="/osint-network-defenders/" data-toggle="tooltip" data-placement="bottom" title="Defend"><i style="font-size: 1.2em;" class="fa fa-shield" aria-hidden="true"></i></a></li>\n <li><a href="/footprinting-reconnaissance/" data-placement="bottom" data-toggle="tooltip" title="Learn"><i style="font-size: 1.2em;" class="fa fa-mortar-board" aria-hidden="true"></i></a></li>\n <li><a href="https://hackertarget.com/" data-toggle="tooltip" title="Online Vulnerability Scanners"><i style="font-size: 1.2em; color: #00CC00;" class="fa fa-bullseye"></i></a></li>\n </ul>\n </nav>\n </div>\n </div>\n\n\n\n\n <div class="cover-container" style="max-width: 900px;">\n <div class="inner cover">\n <h1 class="cover-heading" style="margin-top: 100px;">dns recon & research, find & lookup dns records</h1>\n<p class="lead">\n<div id="hideform">\n<form role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS">\n <div class="form-group">\n<div class="col-md-2"></div><div class="col-md-6">\n\n<input class="form-control" type="text" placeholder="exampledomain.com" name="targetip" id="regularInput" autofocus>\n\n<input type="hidden" name="user" value="free">\n</div></div>\n<div align="left" id="formsubmit"><button type="submit" class="btn btn-default">Search <span class="glyphicon glyphicon-chevron-right"></span></button></div>\n</form></div></div>\n<div class="row"><div class="col-md-2"></div><div class="col-md-8">\n<div id="showloading" style="color: #fff;">Loading...<br>\n<div class="progress">\n<div class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 100%">\n</div></div></div></div></div></div>\n</P>\n\n<div class="row"><div class="col-md-12" style="padding: 80px;">\n\n<p><h4 style="color: #00CC00; text-align: left; font-size: 1.5em; line-height: 2.7em;">Showing results for <span style="font-weight: 700;">blacklanternsecurity.com</span></h4></p>\n<div style="text-align: right; font-size: 1em;"><a href="#dnsanchor"><span class="label label-default">DNS Servers</span></a> <a href="#mxanchor"><span class="label label-default">MX Records</span></a> <a href="#txtanchor"><span class="label label-default">TXT Records</span></a> <a href="#hostanchor"><span class="label label-default">Host (A) Records</span></a> <a href="#domainmap"><span class="label label-default">Domain Map</span></a></div><div class="clearfix" style="height: 30px;"></div>\n<div class="container">\n <div class="row">\n <div class="col-md-4">\n<p style="color: #ddd; font-family: \'Courier New\', Courier, monospace; text-align: left; padding-left: 30px; padding-bottom: 20px;">Hosting (IP block owners)</P>\n<canvas id="hosting" height="380" width="300"></canvas></div>\n <div class="col-md-8">\n<p style="color: #ddd; font-family: \'Courier New\', Courier, monospace; text-align: left; padding-left: 30px;">GeoIP of Host Locations</P>\n <div id="world-map" style="width: 480px; height: 380px"></div>\n</div> </div>\n</div>\n\n<p style="color: #ddd; font-family: \'Courier New\', Courier, monospace; text-align: left;"><a name="dnsanchor"></a>DNS Servers</P>\n<div class="table-responsive" style="text-align: left;">\n <table class="table" style="font-size: 1.1em; border-color: #777;">\n \n <tr><td class="col-md-4">ns01.domaincontrol.com.<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=ns01.domaincontrol.com." data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers from IP address (Active)"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/zonetransfer/?q=ns01.domaincontrol.com." data-target="#myModal"><span class="glyphicon glyphicon-log-in" data-toggle="tooltip" data-placement="top" title="Attempt Zone Transfer (Active)"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=97.74.100.1" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path to IP address using MTR (Active)"></span></a> <a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/findshareddns/?q=ns01.domaincontrol.com." data-target="#myModal"><span class="glyphicon glyphicon-cloud-download" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this DNS server"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="97.74.100.0/23" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="97.74.100.1" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n</td><td class="col-md-3">97.74.100.1<br><span style="font-size: 0.9em; color: #eee;">ns01.domaincontrol.com</span></td><td class="col-md-3">GODADDY-DNS<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n <tr><td class="col-md-4">ns02.domaincontrol.com.<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=ns02.domaincontrol.com." data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers from IP address (Active)"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/zonetransfer/?q=ns02.domaincontrol.com." data-target="#myModal"><span class="glyphicon glyphicon-log-in" data-toggle="tooltip" data-placement="top" title="Attempt Zone Transfer (Active)"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=173.201.68.1" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path to IP address using MTR (Active)"></span></a> <a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/findshareddns/?q=ns02.domaincontrol.com." data-target="#myModal"><span class="glyphicon glyphicon-cloud-download" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this DNS server"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="173.201.68.0/23" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="173.201.68.1" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n</td><td class="col-md-3">173.201.68.1<br><span style="font-size: 0.9em; color: #eee;">ns02.domaincontrol.com</span></td><td class="col-md-3">GODADDY-DNS<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n </table>\n</div>\n\n<p style="color: #ddd; font-family: \'Courier New\', Courier, monospace; text-align: left;"><a name="mxanchor"></a>MX Records <span style="font-size: 0.8em; color: #777;">** This is where email for the domain goes...</P>\n<div class="table-responsive" style="text-align: left;">\n <table class="table" style="font-size: 1.1em; font-family: \'Courier New\', Courier, monospace;">\n \n <tr><td class="col-md-4">asdf.blacklanternsecurity.com.mail.protection.outlook.com.<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/reverseiplookup/?q=104.47.55.138" data-target="#myModal"><span class="glyphicon glyphicon-th" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this IP address"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=104.47.55.138" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="104.40.0.0/13" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="104.47.55.138" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n</td><td class="col-md-3">104.47.55.138<br><span style="font-size: 0.9em; color: #eee;">mail-bn8nam120138.inbound.protection.outlook.com</span></td><td class="col-md-3">MICROSOFT-CORP-MSN-AS-BLOCK<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n </table>\n</div>\n\n<p style="color: #ddd; font-family: \'Courier New\', Courier, monospace; text-align: left;"><a name="txtanchor"></a>TXT Records <span style="font-size: 0.8em; color: #777;">** Find more hosts in Sender Policy Framework (SPF) configurations</span></P>\n<div class="table-responsive" style="text-align: left;">\n <table class="table" style="font-size: 1.1em; font-family: \'Courier New\', Courier, monospace;">\n\n<tr><td>&quot;MS=ms26206678&quot;</td></tr>\n\n<tr><td>&quot;v=spf1 ip4:50.240.76.25 include:spf.protection.outlook.com -all&quot;</td></tr>\n\n<tr><td>&quot;google-site-verification=O_PoQFTGJ_hZ9LqfNT9OEc0KPFERKHQ_1t1m0YTx_1E&quot;</td></tr>\n\n<tr><td>&quot;google-site-verification=7XKUMxJSTHBSzdvT7gH47jLRjNAS76nrEfXmzhR_DO4&quot;</td></tr>\n\n</table>\n</div>\n\n\n<p style="color: #ddd; font-family: \'Courier New\', Courier, monospace; text-align: left;"><a name="hostanchor"></a>Host Records (A) <span style="font-size: 0.8em; color: #777;">** this data may not be current as it uses a static database (updated monthly)</span> </P>\n<div class="table-responsive" style="text-align: left;">\n <table class="table" style="font-size: 1.1em; font-family: \'Courier New\', Courier, monospace;">\n\n \n <tr><td class="col-md-4">blacklanternsecurity.com<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/reverseiplookup/?q=185.199.108.153" data-target="#myModal"><span class="glyphicon glyphicon-th" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this IP address"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=http://blacklanternsecurity.com" data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=185.199.108.153" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="185.199.108.0/24" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="185.199.108.153" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n<!-- -->\n\n<br><span style="font-size: 0.8em; color: #bbb;">HTTP: </span>\n <span style="font-size: 0.9em; color: #eee; color: #0C0;" data-toggle="tooltip" data-placement="top" title="HTTP Server found in Global Scan data (Passive)">GitHub.com</span>\n\n\n\n\n\n\n\n\n<br><span style="font-size: 0.8em; color: #bbb;">HTTP TECH: </span>\n <span style="font-size: 0.9em; color: #eee; color: #0C0;" data-toggle="tooltip" data-placement="top" title="Apps / Technologies found in Global Scan data (Passive)">varnish</span>\n\n\n\n</td><td class="col-md-3">185.199.108.153<br><span style="font-size: 0.9em; color: #eee;">cdn-185-199-108-153.github.com</span></td><td class="col-md-3">FASTLY<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n <tr><td class="col-md-4">asdf.blacklanternsecurity.com<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/reverseiplookup/?q=143.244.156.80" data-target="#myModal"><span class="glyphicon glyphicon-th" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this IP address"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=http://asdf.blacklanternsecurity.com" data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=143.244.156.80" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="143.244.144.0/20" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="143.244.156.80" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n<!-- -->\n\n\n\n\n<br><span style="font-size: 0.8em; color: #bbb;">SSH: </span>\n <span style="font-size: 0.9em; color: #eee; color: #0C0;" data-toggle="tooltip" data-placement="top" title="SSH Server found in Global Scan data (Passive)">SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3</span>\n\n\n\n\n\n\n\n</td><td class="col-md-3">143.244.156.80<br><span style="font-size: 0.9em; color: #eee;">asdf.blacklanternsecurity.com</span></td><td class="col-md-3">DIGITALOCEAN-ASN<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n <tr><td class="col-md-4">asdf.blacklanternsecurity.com<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/reverseiplookup/?q=64.227.8.231" data-target="#myModal"><span class="glyphicon glyphicon-th" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this IP address"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=http://asdf.blacklanternsecurity.com" data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=64.227.8.231" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="64.227.0.0/20" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="64.227.8.231" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n<!-- -->\n\n<br><span style="font-size: 0.8em; color: #bbb;">HTTP: </span>\n <span style="font-size: 0.9em; color: #eee; color: #0C0;" data-toggle="tooltip" data-placement="top" title="HTTP Server found in Global Scan data (Passive)">Apache/2.4.29 (Ubuntu)</span>\n\n\n\n\n\n\n\n\n<br><span style="font-size: 0.8em; color: #bbb;">HTTP TECH: </span>\n <span style="font-size: 0.9em; color: #eee; color: #0C0;" data-toggle="tooltip" data-placement="top" title="Apps / Technologies found in Global Scan data (Passive)">Ubuntu<br>Apache,2.4.29</span>\n\n\n\n</td><td class="col-md-3">64.227.8.231<br><span style="font-size: 0.9em; color: #eee;">asdf.blacklanternsecurity.com</span></td><td class="col-md-3">DIGITALOCEAN-ASN<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n <tr><td class="col-md-4">asdf.blacklanternsecurity.com<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/reverseiplookup/?q=192.34.56.157" data-target="#myModal"><span class="glyphicon glyphicon-th" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this IP address"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=http://asdf.blacklanternsecurity.com" data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=192.34.56.157" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="192.34.56.0/24" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="192.34.56.157" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n<!-- -->\n\n\n\n\n\n\n\n\n\n\n</td><td class="col-md-3">192.34.56.157<br><span style="font-size: 0.9em; color: #eee;">asdf.blacklanternsecurity.com</span></td><td class="col-md-3">DIGITALOCEAN-ASN<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n <tr><td class="col-md-4">asdf.blacklanternsecurity.com<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/reverseiplookup/?q=192.241.216.208" data-target="#myModal"><span class="glyphicon glyphicon-th" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this IP address"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=http://asdf.blacklanternsecurity.com" data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=192.241.216.208" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="192.241.192.0/19" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="192.241.216.208" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n<!-- -->\n\n\n\n\n\n\n\n\n\n\n</td><td class="col-md-3">192.241.216.208<br><span style="font-size: 0.9em; color: #eee;">asdf.blacklanternsecurity.com</span></td><td class="col-md-3">DIGITALOCEAN-ASN<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n <tr><td class="col-md-4">asdf.blacklanternsecurity.com<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/reverseiplookup/?q=167.71.95.71" data-target="#myModal"><span class="glyphicon glyphicon-th" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this IP address"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=http://asdf.blacklanternsecurity.com" data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=167.71.95.71" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="167.71.80.0/20" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="167.71.95.71" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n<!-- -->\n\n\n\n\n\n\n\n\n\n\n</td><td class="col-md-3">167.71.95.71<br><span style="font-size: 0.9em; color: #eee;">asdf.blacklanternsecurity.com</span></td><td class="col-md-3">DIGITALOCEAN-ASN<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n <tr><td class="col-md-4">asdf.blacklanternsecurity.com<br>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/reverseiplookup/?q=157.245.247.197" data-target="#myModal"><span class="glyphicon glyphicon-th" data-toggle="tooltip" data-placement="top" title="Find hosts sharing this IP address"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/httpheaders/?q=http://asdf.blacklanternsecurity.com" data-target="#myModal"><span class="glyphicon glyphicon-globe" data-toggle="tooltip" data-placement="top" title="Get HTTP Headers"></span></a>\n<a class="external nounderline" data-toggle="modal" href="https://api.hackertarget.com/mtr/?q=157.245.247.197" data-target="#myModal"><span class="glyphicon glyphicon-random" data-toggle="tooltip" data-placement="top" title="Trace path"></span></a>\n<form style="display: inline;" role="form" action="." method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="157.245.240.0/20" name="targetip"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Search Banners for Netblock (Passive)"><span class="glyphicon glyphicon-eye-open"></span></button></form>\n<form style="display: inline;" role="form" action="https://hackertarget.com/nmap-online-port-scanner/" target="_blank" method="post"><input type="hidden" name="csrfmiddlewaretoken" value="FNUVMI6wikKoeDeCNL9cFyiCnsxbycmxnwLAffFtp8wzEwJEc1lJHpmrmZFVDxiS"><input type="hidden" value="157.245.247.197" name="send_scan[]"><button class="submit-with-icon" type="submit" data-toggle="tooltip" data-placement="top" title="Nmap Port Scan (Active)"><span class="glyphicon glyphicon-screenshot" style="color: #0C0;"></span></button></form>\n<!-- -->\n\n\n\n\n\n\n\n\n\n\n</td><td class="col-md-3">157.245.247.197<br><span style="font-size: 0.9em; color: #eee;">asdf.blacklanternsecurity.com</span></td><td class="col-md-3">DIGITALOCEAN-ASN<br><span style="font-size: 0.9em; color: #eee;">United States</span></td></tr>\n \n </table>\n<br>\n\n\n\n<div style="margin: 30px;" align="center"><a href="/static/asdf.blacklanternsecurity.com-202305190301.xlsx"><button type="button" class="btn btn-default"><span class="glyphicon glyphicon-download" aria-hidden="true"></span> Download .xlsx of Hosts</button></a> <a href="/static/asdf.blacklanternsecurity.com-202305190301.html" target="_blank"><button type="button" class="btn btn-default"><span class="glyphicon glyphicon-download" aria-hidden="true"></span> View Graph (beta)</button></div>\n\n<br>\n<p style="color: #ddd; font-family: \'Courier New\', Courier, monospace; text-align: left;"><a name="domainmap"></a>Mapping the domain<span style="font-size: 0.8em; color: #777;"> ** click for full size image</span> </P>\n<p>\n<a href="/static/asdf.blacklanternsecurity.com.png"><img style="max-width: 100%;" class="img-responsive" src="/static/asdf.blacklanternsecurity.com.png"></a>\n</p>\n</div>\n\n</div></div>\n\n<p class="lead" style="margin-top: 40px; margin-bottom: 30px;">DNSdumpster.com is a FREE domain research tool that can discover hosts related to a domain. Finding visible hosts from the attackers perspective is an important part of the security assessment process.</p>\n\n </div>\n\n <p style="color: #777; margin-top: 40px;">this is a <a href="https://hackertarget.com/" title="Online Vulnerability Scanners"><button type="button" class="btn btn-danger btn-xs">HackerTarget.com</button></a> project</p>\n\n\n <div style="margin-top: 160px;" class="container">\n <div class="row">\n <div class="col-lg-12 text-center">\n <h2 class="section-heading text-uppercase"></h2>\n <h3 class="section-subheading text-muted">Open Source Intelligence for Networks</h3>\n </div>\n </div>\n <div style="margin-top: 30px;" class="row text-center">\n <div class="col-md-4">\n <span class="fa-stack fa-4x">\n <i class="fa fa-user-secret fa-stack-1x" style="color: #00CC00;"></i>\n </span>\n <h4 class="service-heading">Attack</h4>\n <p class="text-muted">The ability to quickly identify the attack surface is essential. Whether you are penetration testing or chasing bug bounties.</p>\n </div>\n <div class="col-md-4">\n <span class="fa-stack fa-4x">\n <i class="fa fa-shield fa-stack-1x" style="color: #00CC00;"></i>\n </span>\n <h4 class="service-heading">Defend</h4>\n <p class="text-muted">Network defenders benefit from passive reconnaissance in a number of ways. With analysis informing information security strategy.</p>\n </div>\n <div class="col-md-4">\n <span class="fa-stack fa-4x">\n <i class="fa fa-mortar-board fa-stack-1x" style="color: #00CC00;"></i>\n </span>\n <h4 class="service-heading">Learn</h4>\n <p class="text-muted">Understanding network based OSINT helps information technologists to better operate, assess and manage the network.</p>\n </div>\n </div>\n </div>\n\n\n\n\n <div class="container" style="background-color: #474747; margin-top: 180px; padding-bottom: 80px;"><div class="col-md-2"></div><div class="col-md-8">\n\n <span class="glyphicon glyphicon-trash" style="font-size: 4em; line-height: 5.5em;"></span>\n<p style="font-size: 1.7em; line-height: 1.9em; margin-bottom: 80px;">Map an organizations attack surface with a virtual <i>dumpster dive*</i> of the DNS records associated with the target organization.</p>\n<p style="font-size: 1.2em; color: #fff;">*DUMPSTER DIVING: The practice of sifting refuse from an office or technical installation to extract confidential data, especially security-compromising information.</p>\n</div> </div>\n\n\n<div class="container" style="text-align: left; margin-top: 80px; margin-bottom: 80px;">\n\n<h2 style="font-size: 1.8em;">Frequently Asked Questions</h2>\n\n<h4 style="margin-top: 30px;">How can I take my security assessments to the next level?</h4>\n\n<p>The company behind DNSDumpster is <a href="https://hackertarget.com/" title="Online Vulnerability Scanners">hackertarget.com</a> where we provide online hosted access to trusted open source security vulnerability scanners and network intelligence tools.</P><P>Save time and headaches by incorporating our attack surface discovery into your vulnerability assessment process.</p><P style="text-align: center; padding: 30px;"><a href="https://hackertarget.com/" title="HackerTarget.com | Online Security Testing and Open Source Intelligence"><img src="https://hackertarget.com/wp-content/uploads/2019/09/know-your-network-tools.png" alt="HackerTarget.com | Online Security Testing and Open Source Intelligence"></a></p>\n\n<h4>What data does DNSDumpster use?</h4>\n\n<p>No brute force subdomain enumeration is used as is common in dns recon tools that enumerate subdomains. We use open source intelligence resources to query for related domain data. It is then compiled into an actionable resource for both attackers and defenders of Internet facing systems.</P>\n<P>More than a simple <a href="https://hackertarget.com/dns-lookup/" title="Online DNS Lookup">DNS lookup</a> this tool will discover those hard to find sub-domains and web hosts. The search relies on data from our crawls of the Alexa Top 1 Million sites, Search Engines, Common Crawl, Certificate Transparency, Max Mind, Team Cymru, Shodan and <a href="https://scans.io/" style="text-decoration: underline;">scans.io</a>.</P>\n\n<h4>I have hit the host limit, do you have a PRO option?</h4>\n\n<P>Over at <a href="https://hackertarget.com/" title="Online Vulnerability Scanners">hackertarget.com</a> there\'s a tool we call <a href="https://hackertarget.com/domain-profiler/">domain profiler</a>. This compiles data similar to DNSDumpster; with additional data discovery. Queries available are based on the membership plan with the number of results (subdomains) being unlimited. With a STARTER membership you have access to the domain profiler tool for 12 months. Once the years membership expires you will revert to BASIC member status, however access to Domain Profiler and Basic Nmap scans continue. The BASIC access does not expire.</P>\n\n<h4>What are some other resources and tools for learning more?</h4>\n\n<P>There are some great open source recon frameworks that have been developed over the past couple of years. In addition tools such as <b>Metasploit</b> and <b>Nmap</b> include various modules for enumerating DNS. Check our <a href="https://dnsdumpster.com/footprinting-reconnaissance/">Getting Started with Footprinting</a> for more information.</P>\n\n</div>\n\n\n\n<!-- Modal -->\n<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">\n <div class="modal-dialog">\n<div class="modal-heading lds-facebook" style="margin-top: 200px;"><div></div><div></div><div></div></div>\n <div class="modal-content" style="background-color: #CCC; white-space: pre-wrap; padding: 20px; text-shadow: none; font-size: 1.2em; max-width: 1000px;">\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n</div><!-- /.modal -->\n\n</div></div>\n</div></div>\n\n<footer>\n<div class="row" style="background-color: #1e1e1e; padding-top: 40px; padding-bottom: 20px;"><div class="container">\n<div class="col-md-6 col-sm-12 right-border" style="text-align: center;">\n<div class="footer-about" style="text-align: left; padding-left: 40px;">\n<h2 class="footer-title" style="font-size: 1.8em;">About</h2>\n<p style="margin-top: 20px;">At <a href="https://hackertarget.com/">hackertarget.com</a>, we have been scanning the Internet since 2007. Our vulnerability scanners now reach millions of IP addresses every year. We work to raise awareness of the value in open source security solutions.</p>\n</div>\n</div>\n<div class="col-md-6 col-sm-12">\n<div class="contact-info" style="text-align: left; padding-left: 40px;">\n<h2 class="footer-title" style="font-size: 1.8em;">Stay in Touch</h2>\n\n<div class="single">\n <p><i style="font-size: 1.2em;" class="fa fa-envelope"></i> dnsdumpster@gmail.com</p>\n</div>\n<div class="single">\n <p><i style="font-size: 1.2em;" class="fa fa-twitter"></i> <a href="https://twitter.com/hackertarget/">@hackertarget</a></p>\n</div>\n<!-- Begin MailChimp Signup Form -->\n<link href="https://cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css">\n<style type="text/css">\n #mc_embed_signup{background:#1e1e1e; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}\n /* Add your own MailChimp form style overrides in your site stylesheet or in this style block.\n We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */\n </style>\n <div id="mc_embed_signup">\n <form action="https://dnsdumpster.us17.list-manage.com/subscribe/post?u=3cbc62d931a69e74b2c856f1a&amp;id=532c46ab39" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>\n <div id="mc_embed_signup_scroll" style="text-align: left;">\n\n <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>\n <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->\n <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_3cbc62d931a69e74b2c856f1a_532c46ab39" tabindex="-1" value=""></div><br>\n <div class="clear" style="margin-top: 5px;"><input type="submit" style="background-color: #00CC00;" value="Subscribe to our List" name="subscribe" id="mc-embedded-subscribe" class="button"> <span style="font-size: 0.8em;">Low volume Updates and News</a></div>\n </div>\n </form>\n </div>\n\n <!--End mc_embed_signup-->\n\n</div>\n</div>\n</div>\n<div class="clearfix"></div>\n<div class="copyright" style="background-color: #1e1e1e; margin-top: 20px;">\n<p>Copyright &copy; 2023 Hacker Target Pty Ltd</p>\n</div>\n</div>\n</div>\n</div>\n</footer>\n </div>\n </div>\n </div>\n </div>\n\n\n\n\n</div></div>\n\n <!-- Bootstrap core JavaScript\n ================================================== -->\n <!-- Placed at the end of the document so the pages load faster -->\n <script src="https://dnsdumpster.com/static/js/jquery-1.12.4.min.js"></script>\n <script src="/static/js/bootstrap.min.js"></script>\n\n\n<script src="/static/Chart.js"></script>\n <link rel="stylesheet" href="/static/jquery-jvectormap-2.0.1.css" type="text/css" media="screen"/>\n <script src="/static/jquery-jvectormap-2.0.1.min.js"></script>\n <script src="/static/jquery-jvectormap-world-mill-en.js"></script>\n\n <script type="text/javascript">\nvar barChartData = {\nlabels : [\n\n"GODADDY-DNS",\n\n"MICROSOFT-CORP-MSN-AS-BLOCK",\n\n"FASTLY",\n\n"DIGITALOCEAN-ASN",\n\n],\ndatasets : [\n{\nfillColor : "#ccc",\nstrokeColor : "#ccc",\ndata : [\n\n2,\n\n1,\n\n1,\n\n6,\n\n],\n}\n]\n}\n\nwindow.onload = function(){\nvar ctx = document.getElementById("hosting").getContext("2d");\nwindow.myBar = new Chart(ctx).Bar(barChartData, {\n});\n}\n</script>\n\n\n<script>\nvar gdpData = {\n\n"US" : 3,\n\n"United States" : 7,\n\n};\n $(function(){\n$(\'#world-map\').vectorMap({\n map: \'world_mill_en\',\n backgroundColor: \'#333333\',\n zoomButtons : false,\n series: {\n regions: [{\n values: gdpData,\n scale: [\'#00CC00\', \'#008400\'],\n normalizeFunction: \'polynomial\'\n }]\n },\n onRegionTipShow: function(e, el, code){\n if (typeof gdpData[code] !=="undefined"){\n el.html(el.html()+\' <br>Hosts Found : \'+gdpData[code]);\n } \n }\n});\n });\n </script>\n\n\n\n<script type="text/javascript">\n $(document).ready(function() {\n$(\'[data-toggle="tooltip"]\').tooltip({\'placement\': \'top\'});\n\n$("body").on(\'DOMSubtreeModified\', ".modal-content", function() {\n $(".modal-heading").hide();\n $(".modal-content").show();\n});\n\n $(\'body\').on(\'hidden.bs.modal\', \'.modal\', function () {\n $(this).removeData(\'bs.modal\');\n });\n\n }); //END $(document).ready()\n\n\n$(\'a.external\').on(\'click\', function(e) {\n e.preventDefault();\n $(".modal-heading").show();\n $(".modal-content").hide();\n\n\n var url = $(this).attr(\'href\');\n $(".modal-body").html(\'<iframe id="myiframe" style="background-color: #ccc;" width="100%" height="100%" frameborder="0" scrolling="yes" allowtransparency="true" src="\'+url+\'"></iframe>\');\n });\n\n \n\n\n $(\'#myModal\').on(\'show.bs.modal\', function () {\n $(this).find(\'.modal-dialog\').css({\n width:\'80%\', //choose your width\n height:\'80%\',\n \'padding\':\'5\'\n });\n $(this).find(\'.modal-content\').css({\n height:\'100%\',\n \'border-radius\':\'0\',\n \'padding\':\'15\'\n });\n $(this).find(\'.modal-body\').html(null);\n $(this).find(\'.modal-body\').css({\n width:\'auto\',\n height:\'100%\',\n \'padding\':\'5\'\n });\n })\n\n </script>\n\n<script>\n$(document).ready(function(){\n $("#showloading").hide();\n $("#formsubmit").click(function(){\n $("#hideform").hide();\n $("#showloading").show();\n });\n\n});\n</script>\n<!-- Google tag (gtag.js) -->\n<script async src="https://www.googletagmanager.com/gtag/js?id=G-FPGN9YXFNE"></script>\n<script>\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag(\'js\', new Date());\n\n gtag(\'config\', \'G-FPGN9YXFNE\');\n</script>\n </body>\n</html>\n',
11
+ url="https://api.dnsdumpster.com/htmld/",
12
+ content=b"asdf.blacklanternsecurity.com",
15
13
  )
16
14
 
17
15
  def check(self, module_test, events):
@@ -0,0 +1,66 @@
1
+ from .base import ModuleTestBase
2
+
3
+
4
+ class TestGitlab_Com(ModuleTestBase):
5
+ targets = ["http://127.0.0.1:8888"]
6
+ modules_overrides = ["gitlab_com", "httpx", "social", "excavate"]
7
+
8
+ async def setup_before_prep(self, module_test):
9
+ module_test.httpserver.expect_request("/").respond_with_data("<a href='https://gitlab.org/veilidgroup'/>")
10
+ module_test.httpx_mock.add_response(
11
+ url="https://gitlab.org/api/v4/groups/veilidgroup/projects?simple=true",
12
+ json=[
13
+ {
14
+ "id": 55490429,
15
+ "description": None,
16
+ "name": "Veilid",
17
+ "name_with_namespace": "Veilid / Veilid",
18
+ "path": "veilid",
19
+ "path_with_namespace": "veilidgroup/veilid",
20
+ "created_at": "2024-03-03T05:22:53.169Z",
21
+ "default_branch": "master",
22
+ "tag_list": [],
23
+ "topics": [],
24
+ "ssh_url_to_repo": "git@gitlab.org:veilid/veilid.git",
25
+ "http_url_to_repo": "https://gitlab.org/veilidgroup/veilid.git",
26
+ "web_url": "https://gitlab.org/veilidgroup/veilid",
27
+ "readme_url": "https://gitlab.org/veilidgroup/veilid/-/blob/master/README.md",
28
+ "forks_count": 0,
29
+ "avatar_url": None,
30
+ "star_count": 0,
31
+ "last_activity_at": "2024-03-03T05:22:53.097Z",
32
+ "namespace": {
33
+ "id": 66882294,
34
+ "name": "veilidgroup",
35
+ "path": "veilidgroup",
36
+ "kind": "group",
37
+ "full_path": "veilidgroup",
38
+ "parent_id": None,
39
+ "avatar_url": "/uploads/-/system/group/avatar/66882294/signal-2023-07-04-192426_003.jpeg",
40
+ "web_url": "https://gitlab.org/groups/veilidgroup",
41
+ },
42
+ },
43
+ ],
44
+ )
45
+
46
+ def check(self, module_test, events):
47
+ assert 1 == len(
48
+ [
49
+ e
50
+ for e in events
51
+ if e.type == "SOCIAL"
52
+ and e.data["platform"] == "gitlab"
53
+ and e.data["profile_name"] == "veilidgroup"
54
+ and e.data["url"] == "https://gitlab.org/veilidgroup"
55
+ ]
56
+ )
57
+ assert 1 == len(
58
+ [
59
+ e
60
+ for e in events
61
+ if e.type == "CODE_REPOSITORY"
62
+ and "git" in e.tags
63
+ and e.data["url"] == "https://gitlab.org/veilidgroup/veilid"
64
+ and str(e.module) == "gitlab_com"
65
+ ]
66
+ )
@@ -1,10 +1,10 @@
1
1
  from .base import ModuleTestBase
2
2
 
3
3
 
4
- class TestGitlab(ModuleTestBase):
4
+ class TestGitlab_OnPrem(ModuleTestBase):
5
5
  targets = ["http://127.0.0.1:8888"]
6
- modules_overrides = ["gitlab", "httpx"]
7
- config_overrides = {"modules": {"gitlab": {"api_key": "asdf"}}}
6
+ modules_overrides = ["gitlab_onprem", "httpx"]
7
+ config_overrides = {"modules": {"gitlab_onprem": {"api_key": "asdf"}}}
8
8
 
9
9
  async def setup_before_prep(self, module_test):
10
10
  module_test.httpserver.expect_request("/").respond_with_data(headers={"X-Gitlab-Meta": "asdf"})
@@ -179,7 +179,7 @@ class TestGitlab(ModuleTestBase):
179
179
  and e.data["platform"] == "gitlab"
180
180
  and e.data["profile_name"] == "bbotgroup"
181
181
  and e.data["url"] == "http://127.0.0.1:8888/bbotgroup"
182
- and str(e.module) == "gitlab"
182
+ and str(e.module) == "gitlab_onprem"
183
183
  ]
184
184
  )
185
185
  assert 1 == len(
@@ -209,68 +209,3 @@ class TestGitlab(ModuleTestBase):
209
209
  and e.data["url"] == "http://127.0.0.1:8888/bbotgroup/bbot3"
210
210
  ]
211
211
  )
212
-
213
-
214
- class TestGitlabDotOrg(ModuleTestBase):
215
- targets = ["http://127.0.0.1:8888"]
216
- modules_overrides = ["gitlab", "httpx", "social", "excavate"]
217
-
218
- async def setup_before_prep(self, module_test):
219
- module_test.httpserver.expect_request("/").respond_with_data("<a href='https://gitlab.org/veilidgroup'/>")
220
- module_test.httpx_mock.add_response(
221
- url="https://gitlab.org/api/v4/groups/veilidgroup/projects?simple=true",
222
- json=[
223
- {
224
- "id": 55490429,
225
- "description": None,
226
- "name": "Veilid",
227
- "name_with_namespace": "Veilid / Veilid",
228
- "path": "veilid",
229
- "path_with_namespace": "veilidgroup/veilid",
230
- "created_at": "2024-03-03T05:22:53.169Z",
231
- "default_branch": "master",
232
- "tag_list": [],
233
- "topics": [],
234
- "ssh_url_to_repo": "git@gitlab.org:veilid/veilid.git",
235
- "http_url_to_repo": "https://gitlab.org/veilidgroup/veilid.git",
236
- "web_url": "https://gitlab.org/veilidgroup/veilid",
237
- "readme_url": "https://gitlab.org/veilidgroup/veilid/-/blob/master/README.md",
238
- "forks_count": 0,
239
- "avatar_url": None,
240
- "star_count": 0,
241
- "last_activity_at": "2024-03-03T05:22:53.097Z",
242
- "namespace": {
243
- "id": 66882294,
244
- "name": "veilidgroup",
245
- "path": "veilidgroup",
246
- "kind": "group",
247
- "full_path": "veilidgroup",
248
- "parent_id": None,
249
- "avatar_url": "/uploads/-/system/group/avatar/66882294/signal-2023-07-04-192426_003.jpeg",
250
- "web_url": "https://gitlab.org/groups/veilidgroup",
251
- },
252
- },
253
- ],
254
- )
255
-
256
- def check(self, module_test, events):
257
- assert 1 == len(
258
- [
259
- e
260
- for e in events
261
- if e.type == "SOCIAL"
262
- and e.data["platform"] == "gitlab"
263
- and e.data["profile_name"] == "veilidgroup"
264
- and e.data["url"] == "https://gitlab.org/veilidgroup"
265
- ]
266
- )
267
- assert 1 == len(
268
- [
269
- e
270
- for e in events
271
- if e.type == "CODE_REPOSITORY"
272
- and "git" in e.tags
273
- and e.data["url"] == "https://gitlab.org/veilidgroup/veilid"
274
- and str(e.module) == "gitlab"
275
- ]
276
- )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bbot
3
- Version: 2.7.1.7207rc0
3
+ Version: 2.7.2
4
4
  Summary: OSINT automation for hackers.
5
5
  License: GPL-3.0
6
6
  License-File: LICENSE
@@ -1,4 +1,4 @@
1
- bbot/__init__.py,sha256=7rjck6tPrfqw8HCM3lSqwmnScV64cADvYsH0tZ6ucFo,163
1
+ bbot/__init__.py,sha256=S0ODdoaoPWCYtciWgZ3xNYQd6vstpqSDseN8_oArvrM,156
2
2
  bbot/cli.py,sha256=1QJbANVw9Q3GFM92H2QRV2ds5756ulm08CDZwzwPpeI,11888
3
3
  bbot/core/__init__.py,sha256=l255GJE_DvUnWvrRb0J5lG-iMztJ8zVvoweDOfegGtI,46
4
4
  bbot/core/config/__init__.py,sha256=zYNw2Me6tsEr8hOOkLb4BQ97GB7Kis2k--G81S8vofU,342
@@ -90,7 +90,7 @@ bbot/modules/dnsbrute.py,sha256=Y2bSbG2IcwIJID1FSQ6Qe9fdpWwG7GIO-wVQw7MdQFM,2439
90
90
  bbot/modules/dnsbrute_mutations.py,sha256=EbAZ-ZOqk98OAMacc8PuX_zx6eXyn6gJxgFuZ8A71YA,7242
91
91
  bbot/modules/dnscaa.py,sha256=pyaLqHrdsVhqtd1JBZVjKKcuYT_ywUbFYkrnfXcGD5s,5014
92
92
  bbot/modules/dnscommonsrv.py,sha256=wrCRTlqVuxFIScWH0Cb0UQAVk0TWxgVc5fo5awl3R24,1568
93
- bbot/modules/dnsdumpster.py,sha256=bqUqyvRJVtoTXbDxTZ-kgPNq4dCE9xv_msBIn_Nj5IM,3251
93
+ bbot/modules/dnsdumpster.py,sha256=x4_1ZcPRAKDiCWMt7x4bbfcar2-VN6fLjWx0ijPUEmY,2775
94
94
  bbot/modules/dnstlsrpt.py,sha256=v8V72RBsawmDPrMrTcKXEyoFt9bgbfm-cpoPYgKEKLQ,6238
95
95
  bbot/modules/docker_pull.py,sha256=zNQcQdS-JWM2-TbQ_iyjeGA9CKcpuXdeO5ucoJgzZNY,9189
96
96
  bbot/modules/dockerhub.py,sha256=JQkujjqvQRzQuvHjQ7JbFs_VlJj8dLRPRObAkBgUQhc,3493
@@ -110,7 +110,8 @@ bbot/modules/github_codesearch.py,sha256=a-r2vE9N9WyBpFUiKCsg0TK4Qn7DaEGyVRTUKzk
110
110
  bbot/modules/github_org.py,sha256=WM18vJCHuOHJJ5rPzQzQ3Pmp7XPPuaMeVgNfW-FlO0k,8938
111
111
  bbot/modules/github_usersearch.py,sha256=G8knkQBJsn7EKcMhcEaFPiB_Y5S96e2VaseBubsqOyk,3407
112
112
  bbot/modules/github_workflows.py,sha256=xKntAFDeGuE4MqbEmhJyYXKbzoSh9tWYlHNlnF37PYA,10040
113
- bbot/modules/gitlab.py,sha256=9oWWpBijeHCjuFBfWW4HvNqt7bvJvrBgBjaaz_UPPnE,5964
113
+ bbot/modules/gitlab_com.py,sha256=WBNGw4ec-xd_Iz8yxJcxEgTOpsBPxfn5pDU1DtONFgs,1051
114
+ bbot/modules/gitlab_onprem.py,sha256=OwbYeldAUCQvFiYAIikX1-waHii1F0cMPLAtqc4pyHs,3622
114
115
  bbot/modules/google_playstore.py,sha256=N4QjzQag_bgDXfX17rytBiiWA-SQtYI2N0J_ZNEOdv0,3701
115
116
  bbot/modules/gowitness.py,sha256=hMhCz4O1sDJCzCzRIcmu0uNDgDDf9JzkFBwL1WuUum0,13144
116
117
  bbot/modules/graphql_introspection.py,sha256=Y-MqXrN6qmXTv2T6t7hJ-SU3R2guZQRWkrrCLC56bAc,4239
@@ -203,6 +204,7 @@ bbot/modules/subdomainradar.py,sha256=YlRNMtNGLpa13KZ7aksAMVZdSjxe1tkywU5RXlwXpP
203
204
  bbot/modules/telerik.py,sha256=kWi498zihl02gHaS7AvyAxlEAZvmfKgKMSTAG8CS62A,19108
204
205
  bbot/modules/templates/bucket.py,sha256=muLPpfAGtcNhL0tLU-qHTlTNIz4yncRcVjdZMqVRtUI,7153
205
206
  bbot/modules/templates/github.py,sha256=lrV1EYPqjtPkJsS0fQfqmLvGchNo_fO3A75W9-03gxY,2531
207
+ bbot/modules/templates/gitlab.py,sha256=XOwCaYO77ISbVPnjzws2M1klueTnJbXRef-ZsHUtwvA,3895
206
208
  bbot/modules/templates/postman.py,sha256=MIpz2q_r6LP0kIEgByo7oX5qHhMZLOhr7oKzJI9Beec,6959
207
209
  bbot/modules/templates/shodan.py,sha256=MXBvlmfw3jZFqT47v10UkqMSyQR-zBIxMJmK7PWw6uw,1174
208
210
  bbot/modules/templates/sql.py,sha256=o-CdyyoJvHJdJBKkj3CIGXYxUta4w2AB_2Vr-k7cDDU,3553
@@ -346,7 +348,7 @@ bbot/test/test_step_2/module_tests/test_module_dnsbrute.py,sha256=Mwt_Lj3J-n5bPD
346
348
  bbot/test/test_step_2/module_tests/test_module_dnsbrute_mutations.py,sha256=AkL1cOCwHF1unabsbMZz_HXs45K6myxmPndNbcigbjo,3901
347
349
  bbot/test/test_step_2/module_tests/test_module_dnscaa.py,sha256=0PEYXQq2pjNTwulTnwO19nwORgVll124-BwEleKKIeA,2755
348
350
  bbot/test/test_step_2/module_tests/test_module_dnscommonsrv.py,sha256=_dqcgVQAc1wXB0Qete97JIc6_d2eknCByb2nrfMVZ8s,8265
349
- bbot/test/test_step_2/module_tests/test_module_dnsdumpster.py,sha256=p--1JaDb7PjiAYRQiAQ_qYBQAQgkBzB1iLnDp6B0UCk,59745
351
+ bbot/test/test_step_2/module_tests/test_module_dnsdumpster.py,sha256=C6izW0ilZwKZn6XQpsMbPULdQYmM--kvOMCUS6CMvfs,1002
350
352
  bbot/test/test_step_2/module_tests/test_module_dnsresolve.py,sha256=15LEcggP_eVYFQdMO1zHTvoGc6n8IaUjsQDmX0sZS4o,2077
351
353
  bbot/test/test_step_2/module_tests/test_module_dnstlsrpt.py,sha256=8xXSFo0vwKfehIqgF41tbEkL1vbp6RIB8kiO8TSH4NU,2648
352
354
  bbot/test/test_step_2/module_tests/test_module_docker_pull.py,sha256=SKc43IKzwoi74qaY8felJXnrgNVXrXRQlg6BtrSjyAc,28151
@@ -369,7 +371,8 @@ bbot/test/test_step_2/module_tests/test_module_github_codesearch.py,sha256=M50xB
369
371
  bbot/test/test_step_2/module_tests/test_module_github_org.py,sha256=5tKO6NH4TPBeIdeTf7Bz9PUZ1pcvKsjrG0nFhc3YgT0,25458
370
372
  bbot/test/test_step_2/module_tests/test_module_github_usersearch.py,sha256=IIQ0tYZjQN8_L8u_N4m8Nz3kbB4IyBp95tYCPcQeScg,5264
371
373
  bbot/test/test_step_2/module_tests/test_module_github_workflows.py,sha256=o_teEaskm3H22QEKod5KJayFvvcgOQoG4eItGWv8C8E,38006
372
- bbot/test/test_step_2/module_tests/test_module_gitlab.py,sha256=fnwE7BWTU6EQquKdGLCiaX_LwVwvzOLev3Y9GheTLSY,11859
374
+ bbot/test/test_step_2/module_tests/test_module_gitlab_com.py,sha256=fGnjYyMvMZE2hu0Fms9H8rMnPPN6_uynDDDEmcVE9-8,2753
375
+ bbot/test/test_step_2/module_tests/test_module_gitlab_onprem.py,sha256=Soo72Ppt5hYWVUIxMYGnBGPL47EnVDPbTsEHUziKimg,9173
373
376
  bbot/test/test_step_2/module_tests/test_module_google_playstore.py,sha256=uTRqpAGI9HI-rOk_6jdV44OoSqi0QQQ3aTVzvuV0dtc,3034
374
377
  bbot/test/test_step_2/module_tests/test_module_gowitness.py,sha256=8kSeBowX4eejMW791mIaFqP9SDn1l2EDRJatvmZVWug,6500
375
378
  bbot/test/test_step_2/module_tests/test_module_graphql_introspection.py,sha256=qac8DJ_exe6Ra4UgRvVMSdgBhLIZP9lmXyKhi9RPOK8,1241
@@ -460,8 +463,8 @@ bbot/wordlists/raft-small-extensions-lowercase_CLEANED.txt,sha256=ZSIVebs7ptMvHx
460
463
  bbot/wordlists/top_open_ports_nmap.txt,sha256=LmdFYkfapSxn1pVuQC2LkOIY2hMLgG-Xts7DVtYzweM,42727
461
464
  bbot/wordlists/valid_url_schemes.txt,sha256=0B_VAr9Dv7aYhwi6JSBDU-3M76vNtzN0qEC_RNLo7HE,3310
462
465
  bbot/wordlists/wordninja_dns.txt.gz,sha256=DYHvvfW0TvzrVwyprqODAk4tGOxv5ezNmCPSdPuDUnQ,570241
463
- bbot-2.7.1.7207rc0.dist-info/METADATA,sha256=5YlBwh9u0hH775iF8fDwqRPWhRKp8iN2FWl0lDvNuTA,18420
464
- bbot-2.7.1.7207rc0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
465
- bbot-2.7.1.7207rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
466
- bbot-2.7.1.7207rc0.dist-info/licenses/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
467
- bbot-2.7.1.7207rc0.dist-info/RECORD,,
466
+ bbot-2.7.2.dist-info/METADATA,sha256=OBVwJyRnzKqlsC7cCib9bDY8EBPpC76PGoWS_URoAR4,18412
467
+ bbot-2.7.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
468
+ bbot-2.7.2.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
469
+ bbot-2.7.2.dist-info/licenses/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
470
+ bbot-2.7.2.dist-info/RECORD,,
bbot/modules/gitlab.py DELETED
@@ -1,141 +0,0 @@
1
- from bbot.modules.base import BaseModule
2
-
3
-
4
- class gitlab(BaseModule):
5
- watched_events = ["HTTP_RESPONSE", "TECHNOLOGY", "SOCIAL"]
6
- produced_events = ["TECHNOLOGY", "SOCIAL", "CODE_REPOSITORY", "FINDING"]
7
- flags = ["active", "safe", "code-enum"]
8
- meta = {
9
- "description": "Detect GitLab instances and query them for repositories",
10
- "created_date": "2024-03-11",
11
- "author": "@TheTechromancer",
12
- }
13
- options = {"api_key": ""}
14
- options_desc = {"api_key": "Gitlab access token"}
15
-
16
- scope_distance_modifier = 2
17
-
18
- async def setup(self):
19
- await self.require_api_key()
20
- return True
21
-
22
- async def filter_event(self, event):
23
- # only accept out-of-scope SOCIAL events
24
- if event.type == "HTTP_RESPONSE":
25
- if event.scope_distance > self.scan.scope_search_distance:
26
- return False, "event is out of scope distance"
27
- elif event.type == "TECHNOLOGY":
28
- if not event.data["technology"].lower().startswith("gitlab"):
29
- return False, "technology is not gitlab"
30
- if not self.helpers.is_ip(event.host) and self.helpers.tldextract(event.host).domain == "gitlab":
31
- return False, "gitlab instance is not self-hosted"
32
- elif event.type == "SOCIAL":
33
- if event.data["platform"] != "gitlab":
34
- return False, "platform is not gitlab"
35
- return True
36
-
37
- async def handle_event(self, event):
38
- if event.type == "HTTP_RESPONSE":
39
- await self.handle_http_response(event)
40
- elif event.type == "TECHNOLOGY":
41
- await self.handle_technology(event)
42
- elif event.type == "SOCIAL":
43
- await self.handle_social(event)
44
-
45
- async def handle_http_response(self, event):
46
- # identify gitlab instances from HTTP responses
47
- # HTTP_RESPONSE --> TECHNOLOGY
48
- # HTTP_RESPONSE --> FINDING
49
- headers = event.data.get("header", {})
50
- if "x_gitlab_meta" in headers:
51
- url = event.parsed_url._replace(path="/").geturl()
52
- await self.emit_event(
53
- {"host": str(event.host), "technology": "GitLab", "url": url},
54
- "TECHNOLOGY",
55
- parent=event,
56
- context=f"{{module}} detected {{event.type}}: GitLab at {url}",
57
- )
58
- description = f"GitLab server at {event.host}"
59
- await self.emit_event(
60
- {"host": str(event.host), "description": description},
61
- "FINDING",
62
- parent=event,
63
- context=f"{{module}} detected {{event.type}}: {description}",
64
- )
65
-
66
- async def handle_technology(self, event):
67
- # retrieve gitlab groups from gitlab instances
68
- # TECHNOLOGY --> SOCIAL
69
- # TECHNOLOGY --> URL
70
- # TECHNOLOGY --> CODE_REPOSITORY
71
- base_url = self.get_base_url(event)
72
- projects_url = self.helpers.urljoin(base_url, "api/v4/projects?simple=true")
73
- await self.handle_projects_url(projects_url, event)
74
- groups_url = self.helpers.urljoin(base_url, "api/v4/groups?simple=true")
75
- await self.handle_groups_url(groups_url, event)
76
-
77
- async def handle_social(self, event):
78
- # retrieve repositories from gitlab user
79
- # SOCIAL --> CODE_REPOSITORY
80
- # SOCIAL --> SOCIAL
81
- username = event.data.get("profile_name", "")
82
- if not username:
83
- return
84
- base_url = self.get_base_url(event)
85
- urls = [
86
- # group
87
- self.helpers.urljoin(base_url, f"api/v4/users/{username}/projects?simple=true"),
88
- # user
89
- self.helpers.urljoin(base_url, f"api/v4/groups/{username}/projects?simple=true"),
90
- ]
91
- for url in urls:
92
- await self.handle_projects_url(url, event)
93
-
94
- async def handle_projects_url(self, projects_url, event):
95
- for project in await self.gitlab_json_request(projects_url):
96
- project_url = project.get("web_url", "")
97
- if project_url:
98
- code_event = self.make_event({"url": project_url}, "CODE_REPOSITORY", tags="git", parent=event)
99
- await self.emit_event(
100
- code_event, context=f"{{module}} enumerated projects and found {{event.type}} at {project_url}"
101
- )
102
- namespace = project.get("namespace", {})
103
- if namespace:
104
- await self.handle_namespace(namespace, event)
105
-
106
- async def handle_groups_url(self, groups_url, event):
107
- for group in await self.gitlab_json_request(groups_url):
108
- await self.handle_namespace(group, event)
109
-
110
- async def gitlab_json_request(self, url):
111
- response = await self.api_request(url)
112
- if response is not None:
113
- try:
114
- json = response.json()
115
- except Exception:
116
- return []
117
- if json and isinstance(json, list):
118
- return json
119
- return []
120
-
121
- async def handle_namespace(self, namespace, event):
122
- namespace_name = namespace.get("path", "")
123
- namespace_url = namespace.get("web_url", "")
124
- namespace_path = namespace.get("full_path", "")
125
- if namespace_name and namespace_url and namespace_path:
126
- namespace_url = self.helpers.parse_url(namespace_url)._replace(path=f"/{namespace_path}").geturl()
127
- social_event = self.make_event(
128
- {"platform": "gitlab", "profile_name": namespace_path, "url": namespace_url},
129
- "SOCIAL",
130
- parent=event,
131
- )
132
- await self.emit_event(
133
- social_event,
134
- context=f'{{module}} found GitLab namespace ({{event.type}}) "{namespace_name}" at {namespace_url}',
135
- )
136
-
137
- def get_base_url(self, event):
138
- base_url = event.data.get("url", "")
139
- if not base_url:
140
- base_url = f"https://{event.host}"
141
- return self.helpers.urlparse(base_url)._replace(path="/").geturl()