bbot 2.3.0.5399rc0__py3-none-any.whl → 2.3.0.5404rc0__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.5399rc"
2
+ __version__ = "v2.3.0.5404rc"
3
3
 
4
4
  from .scanner import Scanner, Preset
bbot/modules/dnstlsrpt.py CHANGED
@@ -70,7 +70,7 @@ class dnstlsrpt(BaseModule):
70
70
  return False, "event is wildcard"
71
71
 
72
72
  # there's no value in inspecting service records
73
- if service_record(event.host) == True:
73
+ if service_record(event.host) is True:
74
74
  return False, "service record detected"
75
75
 
76
76
  return True
@@ -31,7 +31,7 @@ class dotnetnuke(BaseModule):
31
31
  self.interactsh_subdomain_tags = {}
32
32
  self.interactsh_instance = None
33
33
 
34
- if self.scan.config.get("interactsh_disable", False) == False:
34
+ if self.scan.config.get("interactsh_disable", False) is False:
35
35
  try:
36
36
  self.interactsh_instance = self.helpers.interactsh()
37
37
  self.interactsh_domain = await self.interactsh_instance.register(callback=self.interactsh_callback)
@@ -93,7 +93,7 @@ class dotnetnuke(BaseModule):
93
93
  detected = True
94
94
  break
95
95
 
96
- if detected == True:
96
+ if detected is True:
97
97
  # DNNPersonalization Deserialization Detection
98
98
  for probe_url in [f'{event.data["url"]}/__', f'{event.data["url"]}/', f'{event.data["url"]}']:
99
99
  result = await self.helpers.request(probe_url, cookies=self.exploit_probe)
@@ -73,6 +73,7 @@ class DNSResolve(BaseInterceptModule):
73
73
  if blacklisted:
74
74
  return False, "it has a blacklisted DNS record"
75
75
 
76
+ # DNS resolution for hosts that aren't IPs
76
77
  if not event_is_ip:
77
78
  # if the event is within our dns search distance, resolve the rest of our records
78
79
  if main_host_event.scope_distance < self._dns_search_distance:
@@ -82,9 +83,9 @@ class DNSResolve(BaseInterceptModule):
82
83
  event_data_changed = await self.handle_wildcard_event(main_host_event)
83
84
  if event_data_changed:
84
85
  # since data has changed, we check again whether it's a duplicate
85
- if self.scan.ingress_module.is_incoming_duplicate(event, add=True):
86
+ if event.type == "DNS_NAME" and self.scan.ingress_module.is_incoming_duplicate(event, add=True):
86
87
  if not event._graph_important:
87
- return False, "event was already emitted by its module"
88
+ return False, "it's a DNS wildcard, and its module already emitted a similar wildcard event"
88
89
  else:
89
90
  self.debug(
90
91
  f"Event {event} was already emitted by its module, but it's graph-important so it gets a pass"
@@ -471,7 +471,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
471
471
  self.parameterExtractorCallbackDict[r.__name__] = r
472
472
  regexes_component_list.append(f"${r.__name__} = {r.discovery_regex}")
473
473
  regexes_component = " ".join(regexes_component_list)
474
- self.yara_rules[f"parameter_extraction"] = (
474
+ self.yara_rules["parameter_extraction"] = (
475
475
  rf'rule parameter_extraction {{meta: description = "contains POST form" strings: {regexes_component} condition: any of them}}'
476
476
  )
477
477
 
@@ -503,7 +503,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
503
503
  )
504
504
 
505
505
  if self.excavate.helpers.validate_parameter(parameter_name, parameter_type):
506
- if self.excavate.in_bl(parameter_name) == False:
506
+ if self.excavate.in_bl(parameter_name) is False:
507
507
  parsed_url = urlparse(url)
508
508
  description = f"HTTP Extracted Parameter [{parameter_name}] ({parameterExtractorSubModule.name} Submodule)"
509
509
  data = {
@@ -579,7 +579,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
579
579
  for signature_name, signature in self.signatures.items():
580
580
  signature_component_list.append(rf"${signature_name} = {signature}")
581
581
  signature_component = " ".join(signature_component_list)
582
- self.yara_rules[f"error_detection"] = (
582
+ self.yara_rules["error_detection"] = (
583
583
  f'rule error_detection {{meta: description = "contains a verbose error message" strings: {signature_component} condition: any of them}}'
584
584
  )
585
585
 
@@ -608,7 +608,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
608
608
  for regex_name, regex in self.regexes.items():
609
609
  regexes_component_list.append(rf"${regex_name} = /\b{regex.pattern}/ nocase")
610
610
  regexes_component = " ".join(regexes_component_list)
611
- self.yara_rules[f"serialization_detection"] = (
611
+ self.yara_rules["serialization_detection"] = (
612
612
  f'rule serialization_detection {{meta: description = "contains a possible serialized object" strings: {regexes_component} condition: any of them}}'
613
613
  )
614
614
 
@@ -656,7 +656,8 @@ class excavate(BaseInternalModule, BaseInterceptModule):
656
656
  continue
657
657
  if parsed_url.scheme in ["http", "https"]:
658
658
  continue
659
- abort_if = lambda e: e.scope_distance > 0
659
+ def abort_if(e):
660
+ return e.scope_distance > 0
660
661
  finding_data = {"host": str(host), "description": f"Non-HTTP URI: {parsed_url.geturl()}"}
661
662
  await self.report(finding_data, event, yara_rule_settings, discovery_context, abort_if=abort_if)
662
663
  protocol_data = {"protocol": parsed_url.scheme, "host": str(host)}
@@ -769,7 +770,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
769
770
  def __init__(self, excavate):
770
771
  super().__init__(excavate)
771
772
  if excavate.scan.dns_yara_rules_uncompiled:
772
- self.yara_rules[f"hostname_extraction"] = excavate.scan.dns_yara_rules_uncompiled
773
+ self.yara_rules["hostname_extraction"] = excavate.scan.dns_yara_rules_uncompiled
773
774
 
774
775
  async def process(self, yara_results, event, yara_rule_settings, discovery_context):
775
776
  for identifier in yara_results.keys():
@@ -817,7 +818,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
817
818
  self.parameter_extraction = bool(modules_WEB_PARAMETER)
818
819
 
819
820
  self.retain_querystring = False
820
- if self.config.get("retain_querystring", False) == True:
821
+ if self.config.get("retain_querystring", False) is True:
821
822
  self.retain_querystring = True
822
823
 
823
824
  for module in self.scan.modules.values():
@@ -847,7 +848,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
847
848
  rules_content = f.read()
848
849
  self.debug(f"Successfully loaded custom yara rules file [{self.custom_yara_rules}]")
849
850
  else:
850
- self.debug(f"Custom yara rules file is NOT a file. Will attempt to treat it as rule content")
851
+ self.debug("Custom yara rules file is NOT a file. Will attempt to treat it as rule content")
851
852
  rules_content = self.custom_yara_rules
852
853
 
853
854
  self.debug(f"Final combined yara rule contents: {rules_content}")
@@ -860,7 +861,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
860
861
 
861
862
  rule_match = await self.helpers.re.search(self.yara_rule_name_regex, rule_content)
862
863
  if not rule_match:
863
- return False, f"Custom Yara formatted incorrectly: could not find rule name"
864
+ return False, "Custom Yara formatted incorrectly: could not find rule name"
864
865
 
865
866
  rule_name = rule_match.groups(1)[0]
866
867
  c = CustomExtractor(self)
@@ -936,8 +937,8 @@ class excavate(BaseInternalModule, BaseInterceptModule):
936
937
  if event.type == "HTTP_RESPONSE":
937
938
  # Harvest GET parameters from URL, if it came directly from the target, and parameter extraction is enabled
938
939
  if (
939
- self.parameter_extraction == True
940
- and self.url_querystring_remove == False
940
+ self.parameter_extraction is True
941
+ and self.url_querystring_remove is False
941
942
  and str(event.parent.parent.module) == "TARGET"
942
943
  ):
943
944
  self.debug(f"Processing target URL [{urlunparse(event.parsed_url)}] for GET parameters")
@@ -949,7 +950,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
949
950
  regex_name,
950
951
  additional_params,
951
952
  ) in extract_params_url(event.parsed_url):
952
- if self.in_bl(parameter_name) == False:
953
+ if self.in_bl(parameter_name) is False:
953
954
  description = f"HTTP Extracted Parameter [{parameter_name}] (Target URL)"
954
955
  data = {
955
956
  "host": parsed_url.hostname,
@@ -985,7 +986,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
985
986
  cookie_name = header_value.split("=")[0]
986
987
  cookie_value = header_value.split("=")[1].split(";")[0]
987
988
 
988
- if self.in_bl(cookie_value) == False:
989
+ if self.in_bl(cookie_value) is False:
989
990
  self.assigned_cookies[cookie_name] = cookie_value
990
991
  description = f"Set-Cookie Assigned Cookie [{cookie_name}]"
991
992
  data = {
@@ -1029,7 +1030,7 @@ class excavate(BaseInternalModule, BaseInterceptModule):
1029
1030
  regex_name,
1030
1031
  additional_params,
1031
1032
  ) in extract_params_location(header_value, event.parsed_url):
1032
- if self.in_bl(parameter_name) == False:
1033
+ if self.in_bl(parameter_name) is False:
1033
1034
  description = f"HTTP Extracted Parameter [{parameter_name}] (Location Header)"
1034
1035
  data = {
1035
1036
  "host": parsed_url.hostname,
@@ -172,7 +172,7 @@ class paramminer_headers(BaseModule):
172
172
  self.debug(f"Error initializing compare helper: {e}")
173
173
  return
174
174
  batch_size = await self.count_test(url)
175
- if batch_size == None or batch_size <= 0:
175
+ if batch_size is None or batch_size <= 0:
176
176
  self.debug(f"Failed to get baseline max {self.compare_mode} count, aborting")
177
177
  return
178
178
  self.debug(f"Resolved batch_size at {str(batch_size)}")
@@ -195,11 +195,11 @@ class paramminer_headers(BaseModule):
195
195
  baseline = await self.helpers.request(url)
196
196
  if baseline is None:
197
197
  return
198
- if str(baseline.status_code)[0] in ("4", "5"):
198
+ if str(baseline.status_code)[0] in {"4", "5"}:
199
199
  return
200
200
  for count, args, kwargs in self.gen_count_args(url):
201
201
  r = await self.helpers.request(*args, **kwargs)
202
- if r is not None and not (str(r.status_code)[0] in ("4", "5")):
202
+ if r is not None and str(r.status_code)[0] not in {"4", "5"}:
203
203
  return count
204
204
 
205
205
  def gen_count_args(self, url):
@@ -222,7 +222,7 @@ class paramminer_headers(BaseModule):
222
222
  elif len(group) > 1 or (len(group) == 1 and len(reasons) == 0):
223
223
  for group_slice in self.helpers.split_list(group):
224
224
  match, reasons, reflection, subject_response = await self.check_batch(compare_helper, url, group_slice)
225
- if match == False:
225
+ if match is False:
226
226
  async for r in self.binary_search(compare_helper, url, group_slice, reasons, reflection):
227
227
  yield r
228
228
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bbot
3
- Version: 2.3.0.5399rc0
3
+ Version: 2.3.0.5404rc0
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=2hCc7goae7xxFSqjYWHKoXYZIyQBErClPshRYR9xrkQ,130
1
+ bbot/__init__.py,sha256=-cLt53eqldL4aPsPc2YgOHGI6b7vEurC-gMjbWuRB1s,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
@@ -93,10 +93,10 @@ bbot/modules/dnsbrute_mutations.py,sha256=bOJidK_oKZe87u8e9t0mEFnyuBi93UiNsQvpZY
93
93
  bbot/modules/dnscaa.py,sha256=pyaLqHrdsVhqtd1JBZVjKKcuYT_ywUbFYkrnfXcGD5s,5014
94
94
  bbot/modules/dnscommonsrv.py,sha256=gEErfSur7Odkaif4CbXYx3OZ3FQrQESyiMGPbcDKSIg,1538
95
95
  bbot/modules/dnsdumpster.py,sha256=bqUqyvRJVtoTXbDxTZ-kgPNq4dCE9xv_msBIn_Nj5IM,3251
96
- bbot/modules/dnstlsrpt.py,sha256=LW-8NTfUlYAlSlDrDBcELTe4LTrAI412J03xQfAL93Y,6427
96
+ bbot/modules/dnstlsrpt.py,sha256=ntNKVDXDgDVWr1A20ShNT5HFBhXsVEM5aUIEU_0c9HU,6427
97
97
  bbot/modules/docker_pull.py,sha256=T_xObzExDTZF-_HfgZSfrU199QgCME3rYmkVs1HigXQ,9070
98
98
  bbot/modules/dockerhub.py,sha256=yHKxV-uVubAUvYrIXizSZoLUiPKArTH2mCh5FjY4sas,3486
99
- bbot/modules/dotnetnuke.py,sha256=qS1lzAmvWlDYrm1ODufIBvIS20oTr7m7m3xU-a5PGUA,10537
99
+ bbot/modules/dotnetnuke.py,sha256=rw_EchDg49VyQj5JiUh0AqUqtsuqLrhc-nwrybdzhZ8,10537
100
100
  bbot/modules/emailformat.py,sha256=RLPJW-xitYB-VT4Lp08qVzFkXx_kMyV_035JT_Yf4fM,1082
101
101
  bbot/modules/extractous.py,sha256=_9tJsQRqhYIaPFmMByc2NiyvPhcPgs-KGQ8-XhtkSyc,4546
102
102
  bbot/modules/ffuf_shortnames.py,sha256=9Kh0kJsw7XXpXmCkiB5eAhG4h9rSo8Y-mB3p0EDa_l0,12624
@@ -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=BJFuKFO8JykvKaXq2x9dbIUCbME4SFJPyhiZhnrFiKQ,15219
126
- bbot/modules/internal/excavate.py,sha256=2O09KYw2IIz9NQN6iN_2SXm8Iq6v_pEK0twcsE9FL38,51506
125
+ bbot/modules/internal/dnsresolve.py,sha256=EhZ9KI-cC4P0uIn09Qy7kpPhWU2seeOt-uYLsHqrcO4,15336
126
+ bbot/modules/internal/excavate.py,sha256=18173N5g9xUZKwAPrvR6Y9Vm3WK_174s9YYBvSnqeZo,51527
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
@@ -159,7 +159,7 @@ bbot/modules/output/web_report.py,sha256=lZ0FqRZ7Jz1lljI9JMhH9gjtWLaTCSpSnAKQGAc
159
159
  bbot/modules/output/websocket.py,sha256=sDTtHU-Ey_tvS0gMi6PVPV9L4qAmGyWeccxAKfEWCac,2278
160
160
  bbot/modules/paramminer_cookies.py,sha256=q1PzftHQpCHLz81_VgLZsO6moia7ZtnU32igfcySi2w,1816
161
161
  bbot/modules/paramminer_getparams.py,sha256=_j6rgaqV5wGJoa8p5-KKbe2YsVGUtmWIanCVtFiF97Y,1893
162
- bbot/modules/paramminer_headers.py,sha256=sTHqyfCU46BFOIaArzabiNnegoeQDkaVe42MjyNdEDM,10291
162
+ bbot/modules/paramminer_headers.py,sha256=v5H_feo1FwdEUHzVN72HvSftbf931CH1WInJzi5m3LY,10289
163
163
  bbot/modules/passivetotal.py,sha256=uGT6c_CUxBNInmClsTg8afIYA2ZykKYYCgjkyzujfHg,1653
164
164
  bbot/modules/pgp.py,sha256=Xu2M9WEIlwTm5-Lv29g7BblI05tD9Dl0XsYSeY6UURs,2065
165
165
  bbot/modules/portscan.py,sha256=YdUMPurlDuXFfeS56z2Ab12U3NXBMH71isW86jgeKW0,14650
@@ -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.5399rc0.dist-info/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
418
- bbot-2.3.0.5399rc0.dist-info/METADATA,sha256=tg5jroNAERAI90LP8m4pS1HLWPKb6viYfcOhaUB4OuA,17949
419
- bbot-2.3.0.5399rc0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
420
- bbot-2.3.0.5399rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
421
- bbot-2.3.0.5399rc0.dist-info/RECORD,,
417
+ bbot-2.3.0.5404rc0.dist-info/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
418
+ bbot-2.3.0.5404rc0.dist-info/METADATA,sha256=oZRtFdalyEuSwLkG3CV8YudjhxKSQxNlhWvTYEYmd9U,17949
419
+ bbot-2.3.0.5404rc0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
420
+ bbot-2.3.0.5404rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
421
+ bbot-2.3.0.5404rc0.dist-info/RECORD,,