bbot 2.3.0.5515rc0__py3-none-any.whl → 2.3.0.5520rc0__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.5515rc"
2
+ __version__ = "v2.3.0.5520rc"
3
3
 
4
4
  from .scanner import Scanner, Preset
bbot/core/event/base.py CHANGED
@@ -1578,19 +1578,22 @@ class FILESYSTEM(DictPathEvent):
1578
1578
  # detect type of file content using magic
1579
1579
  from bbot.core.helpers.libmagic import get_magic_info, get_compression
1580
1580
 
1581
- extension, mime_type, description, confidence = get_magic_info(self.data["path"])
1582
- self.data["magic_extension"] = extension
1583
- self.data["magic_mime_type"] = mime_type
1584
- self.data["magic_description"] = description
1585
- self.data["magic_confidence"] = confidence
1586
- # detection compression
1587
- compression = get_compression(mime_type)
1588
- if compression:
1589
- self.add_tag("compressed")
1590
- self.add_tag(f"{compression}-archive")
1591
- self.data["compression"] = compression
1592
- # refresh hash
1593
- self.data = self.data
1581
+ try:
1582
+ extension, mime_type, description, confidence = get_magic_info(self.data["path"])
1583
+ self.data["magic_extension"] = extension
1584
+ self.data["magic_mime_type"] = mime_type
1585
+ self.data["magic_description"] = description
1586
+ self.data["magic_confidence"] = confidence
1587
+ # detection compression
1588
+ compression = get_compression(mime_type)
1589
+ if compression:
1590
+ self.add_tag("compressed")
1591
+ self.add_tag(f"{compression}-archive")
1592
+ self.data["compression"] = compression
1593
+ # refresh hash
1594
+ self.data = self.data
1595
+ except Exception as e:
1596
+ log.debug(f"Error detecting file type: {type(e).__name__}: {e}")
1594
1597
 
1595
1598
 
1596
1599
  class RAW_DNS_RECORD(DictHostEvent, DnsEvent):
@@ -1683,6 +1686,8 @@ def make_event(
1683
1686
  When working within a module's `handle_event()`, use the instance method
1684
1687
  `self.make_event()` instead of calling this function directly.
1685
1688
  """
1689
+ if not data:
1690
+ raise ValidationError("No data provided")
1686
1691
 
1687
1692
  # allow tags to be either a string or an array
1688
1693
  if not tags:
@@ -148,7 +148,8 @@ class filedownload(BaseModule):
148
148
  file_event = self.make_event(
149
149
  {"path": str(file_destination)}, "FILESYSTEM", tags=["filedownload", "file"], parent=source_event
150
150
  )
151
- await self.emit_event(file_event)
151
+ if file_event is not None:
152
+ await self.emit_event(file_event)
152
153
  self.urls_downloaded.add(hash(url))
153
154
 
154
155
  def make_filename(self, url, content_type=None):
@@ -41,7 +41,12 @@ class CloudCheck(BaseInterceptModule):
41
41
 
42
42
  for i, host in enumerate(hosts_to_check):
43
43
  host_is_ip = self.helpers.is_ip(host)
44
- for provider, provider_type, subnet in self.helpers.cloudcheck(host):
44
+ try:
45
+ cloudcheck_results = self.helpers.cloudcheck(host)
46
+ except Exception as e:
47
+ self.trace(f"Error running cloudcheck against {event} (host: {host}): {e}")
48
+ continue
49
+ for provider, provider_type, subnet in cloudcheck_results:
45
50
  if provider:
46
51
  event.add_tag(f"{provider_type}-{provider}")
47
52
  if host_is_ip:
bbot/modules/wpscan.py CHANGED
@@ -141,10 +141,10 @@ class wpscan(BaseModule):
141
141
 
142
142
  def parse_wpscan_output(self, output, base_url, source_event):
143
143
  json_output = json.loads(output)
144
- interesting_json = json_output.get("interesting_findings", {})
145
- version_json = json_output.get("version", {})
146
- theme_json = json_output.get("main_theme", {})
147
- plugins_json = json_output.get("plugins", {})
144
+ interesting_json = json_output.get("interesting_findings", {}) or {}
145
+ version_json = json_output.get("version", {}) or {}
146
+ theme_json = json_output.get("main_theme", {}) or {}
147
+ plugins_json = json_output.get("plugins", {}) or {}
148
148
  if interesting_json:
149
149
  yield from self.parse_wp_misc(interesting_json, base_url, source_event)
150
150
  if version_json:
@@ -622,6 +622,10 @@ async def test_events(events, helpers):
622
622
  assert str(parent_event_3.module) == "mymodule"
623
623
  assert str(parent_event_3.module_sequence) == "mymodule->mymodule->mymodule"
624
624
 
625
+ # event with no data
626
+ with pytest.raises(ValidationError):
627
+ event = scan.make_event(None, "DNS_NAME", parent=scan.root_event)
628
+
625
629
  await scan._cleanup()
626
630
 
627
631
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bbot
3
- Version: 2.3.0.5515rc0
3
+ Version: 2.3.0.5520rc0
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=oimTyBbh5MZFwfgUpVPoSVJEtl-0s9JirlNczNveMLI,130
1
+ bbot/__init__.py,sha256=PVSzvE4mc67xxUnsnw4SqQZSRfdYgNX6520nudHPYRM,130
2
2
  bbot/cli.py,sha256=SUEd4CcI-9QzFnqXpezza1sq_TNPcfDtJaSwL4MAl9g,10717
3
3
  bbot/core/__init__.py,sha256=l255GJE_DvUnWvrRb0J5lG-iMztJ8zVvoweDOfegGtI,46
4
4
  bbot/core/config/__init__.py,sha256=zYNw2Me6tsEr8hOOkLb4BQ97GB7Kis2k--G81S8vofU,342
@@ -7,7 +7,7 @@ bbot/core/config/logger.py,sha256=FzQ7Myl0MVqBi7gpn9LOnbuL-UTXxSKpl11xuEGxS5I,10
7
7
  bbot/core/core.py,sha256=V0G3dKPN5xCbXOoFeBRkh-BZb6A3kSNA060De01LiTU,7065
8
8
  bbot/core/engine.py,sha256=uauGZgd7zAnJwNmVVPDicwHbUVCa8pV_pif49lgYeWk,29364
9
9
  bbot/core/event/__init__.py,sha256=8ut88ZUg0kbtWkOx2j3XzNr_3kTfgoM-3UdiWHFA_ag,56
10
- bbot/core/event/base.py,sha256=MGncvzKzJI1-KwhhyDMDGmRACBT3IKFDgPbI6sLzcHw,62877
10
+ bbot/core/event/base.py,sha256=4QDGH4ZY1DsgJAxORnAomOa4sAMs-JPWVIjh0fgb9ZQ,63129
11
11
  bbot/core/event/helpers.py,sha256=PUN4Trq5_wpKVuhmwUQWAr40apgMXhJ9Gz-VfZ0j3lA,1554
12
12
  bbot/core/flags.py,sha256=Ltvm8Bc4D65I55HuU5bzyjO1R3yMDNpVmreGU83ZBXE,1266
13
13
  bbot/core/helpers/__init__.py,sha256=0UNwcZjNsX41hbHdo3yZPuARkYWch-okI68DScexve4,86
@@ -100,7 +100,7 @@ bbot/modules/dotnetnuke.py,sha256=rw_EchDg49VyQj5JiUh0AqUqtsuqLrhc-nwrybdzhZ8,10
100
100
  bbot/modules/emailformat.py,sha256=RLPJW-xitYB-VT4Lp08qVzFkXx_kMyV_035JT_Yf4fM,1082
101
101
  bbot/modules/extractous.py,sha256=LbqfCoMXGyP19dxw0CIcbEPnyX7_eRWvuhHGHQ4wDXw,4641
102
102
  bbot/modules/ffuf_shortnames.py,sha256=9Kh0kJsw7XXpXmCkiB5eAhG4h9rSo8Y-mB3p0EDa_l0,12624
103
- bbot/modules/filedownload.py,sha256=FRUUinKCOIRCd9c9EBnKZvjmnVJoHuKMzLdtjOSEGm0,8378
103
+ bbot/modules/filedownload.py,sha256=zJpsLKwrWWOtRfbw6wRgxtRIa0_CLxp2MPYDXBoNl4w,8425
104
104
  bbot/modules/fingerprintx.py,sha256=rdlR9d64AntAhbS_eJzh8bZCeLPTJPSKdkdKdhH_qAo,3269
105
105
  bbot/modules/fullhunt.py,sha256=zeehQb9akBSbHW9dF4icH8Vfd8LqoTrpIvnQEEMWes8,1311
106
106
  bbot/modules/generic_ssrf.py,sha256=4JzlOXd7MMwDZEhEEXpLdkMUe8y3Qqql7ggb3eZeN54,7946
@@ -121,7 +121,7 @@ bbot/modules/iis_shortnames.py,sha256=bIlmC21a0eK_cjMu1UQkDl9EfpfCN1SAggDqJL8LJf
121
121
  bbot/modules/internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
122
  bbot/modules/internal/aggregate.py,sha256=csWYIt2fUp9K_CRxP3bndUMIjpNIh8rmBubp5Fr1-nc,395
123
123
  bbot/modules/internal/base.py,sha256=BXO4Hc7XKaAOaLzolF3krJX1KibPxtek2GTQUgnCHk0,387
124
- bbot/modules/internal/cloudcheck.py,sha256=sr1_dj4eqcD3x8MigZkjf0AxZZWSJFzvRjYGl5uxVdk,4913
124
+ bbot/modules/internal/cloudcheck.py,sha256=ay6MvZFbDvdhAlFPe_kEITM4wRsfRgQJf1DLBTcZ2jM,5138
125
125
  bbot/modules/internal/dnsresolve.py,sha256=1fwWChIGpSEIIkswueiIhEwIahQ7YngZ-njFK-RIsfU,15679
126
126
  bbot/modules/internal/excavate.py,sha256=4buS6KL0g-spt9n3Toae-7xj2HZDw3RDAYr6Er006_4,51871
127
127
  bbot/modules/internal/speculate.py,sha256=NolqW2s8tokibc6gVM960KlrABkjhLB-7YlCdVx4O9s,9223
@@ -198,7 +198,7 @@ bbot/modules/virustotal.py,sha256=NIBF8jxvmeCEnmnUPOo0D3NwegjmlywzdbZ1w5pR7zI,10
198
198
  bbot/modules/wafw00f.py,sha256=3wmH3xhVI5-fpc9UVsYVRKFUrXvM0gzarcdHEmy83Ao,2536
199
199
  bbot/modules/wappalyzer.py,sha256=LL5QeY5DeG7LdaFzZZU-LXaVlJ-sHzOwQLgFtxW3TNg,2176
200
200
  bbot/modules/wayback.py,sha256=9cxd_HfHgLp4AChzA8C0Zjd6DIJ7c3NsJ02W2oLIXuU,3257
201
- bbot/modules/wpscan.py,sha256=_mE1OAU7sZUW5HbJ5GepFsljzJ89Z0zmam4jZb69a40,11582
201
+ bbot/modules/wpscan.py,sha256=FVqZpjV3GrejjiowiqdwIb8t_pPl9yMVRtsAMzC-heA,11606
202
202
  bbot/modules/zoomeye.py,sha256=0T_0PqNnDuUsKPrWCgk30meHEJB8iJPPAm4NLtDdsrI,2724
203
203
  bbot/presets/baddns-thorough.yml,sha256=FXiNnsf3IIms3UJtS2CwLk82Yp0IXm1OvRM61-CHrno,195
204
204
  bbot/presets/cloud-enum.yml,sha256=U1IuN_Vx4zFSvobQenXwSeEqFxRX28beS1Aek3hNUBg,121
@@ -249,7 +249,7 @@ bbot/test/test_step_1/test_depsinstaller.py,sha256=zr9f-wJDotD1ZvKXGEuDRWzFYMAYB
249
249
  bbot/test/test_step_1/test_dns.py,sha256=SjefP-8GGyx9q-PWotCWu4esF0dRhWJRrS-J5MGNi6w,32153
250
250
  bbot/test/test_step_1/test_docs.py,sha256=YWVGNRfzcrvDmFekX0Cq9gutQplsqvhKTpZ0XK4tWvo,82
251
251
  bbot/test/test_step_1/test_engine.py,sha256=3HkCPtYhUxiZzfA-BRHpLsyaRj9wIXKbb49BCk9dILM,4267
252
- bbot/test/test_step_1/test_events.py,sha256=E09r2gpXnlG580wrPPPXRa3aCT6cJprTGD1_D0AiM-E,52717
252
+ bbot/test/test_step_1/test_events.py,sha256=fFlppfiCesP1DX1tgG0U8NlOpTQe0hWeaE43A_MNXyo,52858
253
253
  bbot/test/test_step_1/test_files.py,sha256=5Q_3jPpMXULxDHsanSDUaj8zF8bXzKdiJZHOmoYpLhQ,699
254
254
  bbot/test/test_step_1/test_helpers.py,sha256=hZfnzjtegezYOqTuo5uAaXGI2GGsfuHhglbfaPPYV-U,39482
255
255
  bbot/test/test_step_1/test_manager_deduplication.py,sha256=hZQpDXzg6zvzxFolVOcJuY-ME8NXjZUsqS70BRNXp8A,15594
@@ -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.5515rc0.dist-info/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
418
- bbot-2.3.0.5515rc0.dist-info/METADATA,sha256=xzPt5j3DToJSPRoCA-23NwQu8RMrhE4vpA-tUQ8Nhjk,18213
419
- bbot-2.3.0.5515rc0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
420
- bbot-2.3.0.5515rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
421
- bbot-2.3.0.5515rc0.dist-info/RECORD,,
417
+ bbot-2.3.0.5520rc0.dist-info/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
418
+ bbot-2.3.0.5520rc0.dist-info/METADATA,sha256=-L-flwIcLE6OSgOsM0OY6EbeOv2gltfK9SyCNtXWzA0,18213
419
+ bbot-2.3.0.5520rc0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
420
+ bbot-2.3.0.5520rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
421
+ bbot-2.3.0.5520rc0.dist-info/RECORD,,