bbot 2.3.0.5418rc0__py3-none-any.whl → 2.3.0.5423rc0__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,4 +1,4 @@
1
1
  # version placeholder (replaced by poetry-dynamic-versioning)
2
- __version__ = "v2.3.0.5418rc"
2
+ __version__ = "v2.3.0.5423rc"
3
3
 
4
4
  from .scanner import Scanner, Preset
@@ -83,9 +83,14 @@ class DNSResolve(BaseInterceptModule):
83
83
  event_data_changed = await self.handle_wildcard_event(main_host_event)
84
84
  if event_data_changed:
85
85
  # since data has changed, we check again whether it's a duplicate
86
- if event.type == "DNS_NAME" and self.scan.ingress_module.is_incoming_duplicate(event, add=True):
86
+ if event.type == "DNS_NAME" and self.scan.ingress_module.is_incoming_duplicate(
87
+ event, add=True
88
+ ):
87
89
  if not event._graph_important:
88
- return False, "it's a DNS wildcard, and its module already emitted a similar wildcard event"
90
+ return (
91
+ False,
92
+ "it's a DNS wildcard, and its module already emitted a similar wildcard event",
93
+ )
89
94
  else:
90
95
  self.debug(
91
96
  f"Event {event} was already emitted by its module, but it's graph-important so it gets a pass"
@@ -656,8 +656,10 @@ class excavate(BaseInternalModule, BaseInterceptModule):
656
656
  continue
657
657
  if parsed_url.scheme in ["http", "https"]:
658
658
  continue
659
+
659
660
  def abort_if(e):
660
661
  return e.scope_distance > 0
662
+
661
663
  finding_data = {"host": str(host), "description": f"Non-HTTP URI: {parsed_url.geturl()}"}
662
664
  await self.report(finding_data, event, yara_rule_settings, discovery_context, abort_if=abort_if)
663
665
  protocol_data = {"protocol": parsed_url.scheme, "host": str(host)}
bbot/scanner/target.py CHANGED
@@ -192,7 +192,6 @@ class ScanBlacklist(ACLTarget):
192
192
  @special_target_type(r"^(?:RE|REGEX):(.*)")
193
193
  def handle_regex(self, match):
194
194
  pattern = match.group(1)
195
- log.info(f"Blacklisting by custom regex: {pattern}")
196
195
  blacklist_regex = re.compile(pattern, re.IGNORECASE)
197
196
  self.blacklist_regexes.add(blacklist_regex)
198
197
  return []
@@ -225,6 +224,12 @@ class ScanBlacklist(ACLTarget):
225
224
  hosts = [str(h).encode() for h in self.sorted_hosts]
226
225
  return hosts + regex_patterns
227
226
 
227
+ def __len__(self):
228
+ return super().__len__() + len(self.blacklist_regexes)
229
+
230
+ def __bool__(self):
231
+ return bool(len(self))
232
+
228
233
 
229
234
  class BBOTTarget:
230
235
  """
@@ -395,6 +395,7 @@ async def test_blacklist_regex(bbot_scanner, bbot_httpserver):
395
395
  config={"excavate": True},
396
396
  debug=True,
397
397
  )
398
+ assert len(scan.target.blacklist) == 2
398
399
  assert scan.target.blacklist.blacklist_regexes
399
400
  assert {r.pattern for r in scan.target.blacklist.blacklist_regexes} == {
400
401
  r"evil[0-9]{3}",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bbot
3
- Version: 2.3.0.5418rc0
3
+ Version: 2.3.0.5423rc0
4
4
  Summary: OSINT automation for hackers.
5
5
  Home-page: https://github.com/blacklanternsecurity/bbot
6
6
  License: GPL-3.0
@@ -1,4 +1,4 @@
1
- bbot/__init__.py,sha256=qHf85UfjVTNc5OVxvCj-BhW-gd0vPhbyJtHwYfPTzw4,130
1
+ bbot/__init__.py,sha256=LdP06wn7DHX_800M7nQMUIA8LKbluosrRSK4gYZ1bqM,130
2
2
  bbot/cli.py,sha256=xPTXsZr8FGmI3N6e3gjo9i9E2u-Ih2Sr4MQU6RTxnj8,10434
3
3
  bbot/core/__init__.py,sha256=l255GJE_DvUnWvrRb0J5lG-iMztJ8zVvoweDOfegGtI,46
4
4
  bbot/core/config/__init__.py,sha256=zYNw2Me6tsEr8hOOkLb4BQ97GB7Kis2k--G81S8vofU,342
@@ -122,8 +122,8 @@ bbot/modules/internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
122
122
  bbot/modules/internal/aggregate.py,sha256=csWYIt2fUp9K_CRxP3bndUMIjpNIh8rmBubp5Fr1-nc,395
123
123
  bbot/modules/internal/base.py,sha256=BXO4Hc7XKaAOaLzolF3krJX1KibPxtek2GTQUgnCHk0,387
124
124
  bbot/modules/internal/cloudcheck.py,sha256=WVW5gQQhnJmTb1_wl4MjM_HUNQIKS8kIQFNKdaAGJiY,4754
125
- bbot/modules/internal/dnsresolve.py,sha256=EhZ9KI-cC4P0uIn09Qy7kpPhWU2seeOt-uYLsHqrcO4,15336
126
- bbot/modules/internal/excavate.py,sha256=18173N5g9xUZKwAPrvR6Y9Vm3WK_174s9YYBvSnqeZo,51527
125
+ bbot/modules/internal/dnsresolve.py,sha256=643r5hJ6KRGuwn3ldIVOiyUNEex0Mfvp1Y4t_GgPnSI,15499
126
+ bbot/modules/internal/excavate.py,sha256=IazekmFOnjrqghTf9YhBbMM4dohv27vIEvfNZXJSZvg,51529
127
127
  bbot/modules/internal/speculate.py,sha256=1UX5YKCfUnJ4EV8suHSAdq1Y2decEjIV88LQ8-VQcRQ,9260
128
128
  bbot/modules/internetdb.py,sha256=Edg0Z84dH8dPTZMd7RlzvYBYNq8JHs_ns_ldnFxwRKo,5415
129
129
  bbot/modules/ip2location.py,sha256=yGivX9fzvwvLpnqmYCP2a8SPjTarzrZxfRluog-nkME,2628
@@ -227,7 +227,7 @@ bbot/scanner/preset/path.py,sha256=Q29MO8cOEn690yW6bB08P72kbZ3C-H_TOEoXuwWnFM8,2
227
227
  bbot/scanner/preset/preset.py,sha256=R8-RNEstx4kLMZcfz878qzmTpEH45kgg3itRK-FWw5I,40038
228
228
  bbot/scanner/scanner.py,sha256=GTTimZPPjX7vFIAgmMpPcxnn4ZijHE3yjMEfTORKy88,53853
229
229
  bbot/scanner/stats.py,sha256=re93sArKXZSiD0Owgqk2J3Kdvfm3RL4Y9Qy_VOcaVk8,3623
230
- bbot/scanner/target.py,sha256=pxdICjl7Nl2aksTeFGtDilpW7EhLCIQtZJ7pertsPz4,11469
230
+ bbot/scanner/target.py,sha256=kYB2ItVzZDPaz1tj3iOe0LTkpntK7S8mfJ4qEJSOiSQ,11551
231
231
  bbot/scripts/docs.py,sha256=ZLY9-O6OeEElzOUvTglO5EMkRv1s4aEuxJb2CthCVsI,10782
232
232
  bbot/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
233
233
  bbot/test/bbot_fixtures.py,sha256=PNIycAMcNWM8oZ6BvvQmSbif1sztdOgyQ_e9lfQA6gA,9981
@@ -260,7 +260,7 @@ bbot/test/test_step_1/test_python_api.py,sha256=GM5Kp2AAFl92ozo1kL6axsM87F8Gdq2_
260
260
  bbot/test/test_step_1/test_regexes.py,sha256=34-BHzDE5qdltE-sQIzkrTmJTL49QUYoTn2uT1DZLwI,14356
261
261
  bbot/test/test_step_1/test_scan.py,sha256=h3JP5RXnOUH8dqqq2Q_7yLpx1LCAEvqfE1bpHL7bDS0,5756
262
262
  bbot/test/test_step_1/test_scope.py,sha256=S2nssENKJKCvgXUMyU8MFQmXHeUIz0C_sbWGkdYti2A,3063
263
- bbot/test/test_step_1/test_target.py,sha256=Kd-tk9033GIQR9mlJ2a5y-4_YtC9XCOmjx6dcgu78qs,19084
263
+ bbot/test/test_step_1/test_target.py,sha256=O-r7WxLdO6C3FmhjhA9rfRWb3uX4xW0eEQX4qCMFG7Q,19127
264
264
  bbot/test/test_step_1/test_web.py,sha256=n9p9WhsEyN5I7S8RUUOEzF8v1CyeJjkmk4l6hnpOblY,18804
265
265
  bbot/test/test_step_2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
266
266
  bbot/test/test_step_2/module_tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -414,8 +414,8 @@ bbot/wordlists/raft-small-extensions-lowercase_CLEANED.txt,sha256=ZSIVebs7ptMvHx
414
414
  bbot/wordlists/top_open_ports_nmap.txt,sha256=LmdFYkfapSxn1pVuQC2LkOIY2hMLgG-Xts7DVtYzweM,42727
415
415
  bbot/wordlists/valid_url_schemes.txt,sha256=0B_VAr9Dv7aYhwi6JSBDU-3M76vNtzN0qEC_RNLo7HE,3310
416
416
  bbot/wordlists/wordninja_dns.txt.gz,sha256=DYHvvfW0TvzrVwyprqODAk4tGOxv5ezNmCPSdPuDUnQ,570241
417
- bbot-2.3.0.5418rc0.dist-info/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
418
- bbot-2.3.0.5418rc0.dist-info/METADATA,sha256=_i6aZZx3cPBTqNqTXbUxrAVoqzSrIN4zIBlk0YGxCyQ,17949
419
- bbot-2.3.0.5418rc0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
420
- bbot-2.3.0.5418rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
421
- bbot-2.3.0.5418rc0.dist-info/RECORD,,
417
+ bbot-2.3.0.5423rc0.dist-info/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
418
+ bbot-2.3.0.5423rc0.dist-info/METADATA,sha256=Xijs0MQx3HBuMhNV53hM89g8TXQmOP5JsOI4y33U6mE,17949
419
+ bbot-2.3.0.5423rc0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
420
+ bbot-2.3.0.5423rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
421
+ bbot-2.3.0.5423rc0.dist-info/RECORD,,