bbot 2.1.1.5121rc0__py3-none-any.whl → 2.1.1.5125rc0__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.
bbot/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # version placeholder (replaced by poetry-dynamic-versioning)
2
- __version__ = "v2.1.1.5121rc"
2
+ __version__ = "v2.1.1.5125rc"
3
3
 
4
4
  from .scanner import Scanner, Preset
bbot/modules/gowitness.py CHANGED
@@ -1,5 +1,5 @@
1
1
  import asyncio
2
- import sqlite3
2
+ import aiosqlite
3
3
  import multiprocessing
4
4
  from pathlib import Path
5
5
  from contextlib import suppress
@@ -34,6 +34,7 @@ class gowitness(BaseModule):
34
34
  "idle_timeout": "Skip the current gowitness batch if it stalls for longer than this many seconds",
35
35
  }
36
36
  deps_common = ["chromium"]
37
+ deps_pip = ["aiosqlite"]
37
38
  deps_ansible = [
38
39
  {
39
40
  "name": "Download gowitness",
@@ -136,7 +137,8 @@ class gowitness(BaseModule):
136
137
  return
137
138
 
138
139
  # emit web screenshots
139
- for filename, screenshot in self.new_screenshots.items():
140
+ new_screenshots = await self.get_new_screenshots()
141
+ for filename, screenshot in new_screenshots.items():
140
142
  url = screenshot["url"]
141
143
  final_url = screenshot["final_url"]
142
144
  filename = self.screenshot_path / screenshot["filename"]
@@ -150,7 +152,8 @@ class gowitness(BaseModule):
150
152
  )
151
153
 
152
154
  # emit URLs
153
- for url, row in self.new_network_logs.items():
155
+ new_network_logs = await self.get_new_network_logs()
156
+ for url, row in new_network_logs.items():
154
157
  ip = row["ip"]
155
158
  status_code = row["status_code"]
156
159
  tags = [f"status-{status_code}", f"ip-{ip}", "spider-danger"]
@@ -168,7 +171,8 @@ class gowitness(BaseModule):
168
171
  )
169
172
 
170
173
  # emit technologies
171
- for _, row in self.new_technologies.items():
174
+ new_technologies = await self.get_new_technologies()
175
+ for _, row in new_technologies.items():
172
176
  parent_id = row["url_id"]
173
177
  parent_url = self.screenshots_taken[parent_id]
174
178
  parent_event = event_dict[parent_url]
@@ -207,59 +211,53 @@ class gowitness(BaseModule):
207
211
  command += ["--timeout", str(self.timeout)]
208
212
  return command
209
213
 
210
- @property
211
- def new_screenshots(self):
214
+ async def get_new_screenshots(self):
212
215
  screenshots = {}
213
216
  if self.db_path.is_file():
214
- with sqlite3.connect(str(self.db_path)) as con:
215
- con.row_factory = sqlite3.Row
217
+ async with aiosqlite.connect(str(self.db_path)) as con:
218
+ con.row_factory = aiosqlite.Row
216
219
  con.text_factory = self.helpers.smart_decode
217
- cur = con.cursor()
218
- res = self.cur_execute(cur, "SELECT * FROM urls")
219
- for row in res:
220
- row = dict(row)
221
- _id = row["id"]
222
- if _id not in self.screenshots_taken:
223
- self.screenshots_taken[_id] = row["url"]
224
- screenshots[_id] = row
220
+ async with con.execute("SELECT * FROM urls") as cur:
221
+ async for row in cur:
222
+ row = dict(row)
223
+ _id = row["id"]
224
+ if _id not in self.screenshots_taken:
225
+ self.screenshots_taken[_id] = row["url"]
226
+ screenshots[_id] = row
225
227
  return screenshots
226
228
 
227
- @property
228
- def new_network_logs(self):
229
+ async def get_new_network_logs(self):
229
230
  network_logs = dict()
230
231
  if self.db_path.is_file():
231
- with sqlite3.connect(str(self.db_path)) as con:
232
- con.row_factory = sqlite3.Row
233
- cur = con.cursor()
234
- res = self.cur_execute(cur, "SELECT * FROM network_logs")
235
- for row in res:
236
- row = dict(row)
237
- url = row["final_url"]
238
- if url not in self.connections_logged:
239
- self.connections_logged.add(url)
240
- network_logs[url] = row
232
+ async with aiosqlite.connect(str(self.db_path)) as con:
233
+ con.row_factory = aiosqlite.Row
234
+ async with con.execute("SELECT * FROM network_logs") as cur:
235
+ async for row in cur:
236
+ row = dict(row)
237
+ url = row["final_url"]
238
+ if url not in self.connections_logged:
239
+ self.connections_logged.add(url)
240
+ network_logs[url] = row
241
241
  return network_logs
242
242
 
243
- @property
244
- def new_technologies(self):
243
+ async def get_new_technologies(self):
245
244
  technologies = dict()
246
245
  if self.db_path.is_file():
247
- with sqlite3.connect(str(self.db_path)) as con:
248
- con.row_factory = sqlite3.Row
249
- cur = con.cursor()
250
- res = self.cur_execute(cur, "SELECT * FROM technologies")
251
- for row in res:
252
- _id = row["id"]
253
- if _id not in self.technologies_found:
254
- self.technologies_found.add(_id)
255
- row = dict(row)
256
- technologies[_id] = row
246
+ async with aiosqlite.connect(str(self.db_path)) as con:
247
+ con.row_factory = aiosqlite.Row
248
+ async with con.execute("SELECT * FROM technologies") as cur:
249
+ async for row in cur:
250
+ _id = row["id"]
251
+ if _id not in self.technologies_found:
252
+ self.technologies_found.add(_id)
253
+ row = dict(row)
254
+ technologies[_id] = row
257
255
  return technologies
258
256
 
259
- def cur_execute(self, cur, query):
257
+ async def cur_execute(self, cur, query):
260
258
  try:
261
- return cur.execute(query)
262
- except sqlite3.OperationalError as e:
259
+ return await cur.execute(query)
260
+ except aiosqlite.OperationalError as e:
263
261
  self.warning(f"Error executing query: {query}: {e}")
264
262
  return []
265
263
 
@@ -13,7 +13,7 @@ class trufflehog(BaseModule):
13
13
  }
14
14
 
15
15
  options = {
16
- "version": "3.82.13",
16
+ "version": "3.83.1",
17
17
  "config": "",
18
18
  "only_verified": True,
19
19
  "concurrency": 8,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bbot
3
- Version: 2.1.1.5121rc0
3
+ Version: 2.1.1.5125rc0
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=cT7Ozli0Bw8NQamWR_5kW4FkAXu5V-AXpEIhw6r9kx8,130
1
+ bbot/__init__.py,sha256=U7pTaUN5NC3oAf7-LmwNlY2Pf3bfMiozH3m66AlwBgA,130
2
2
  bbot/cli.py,sha256=7S3a4eB-Dl8yodc5WC-927Z30CNlLl9EXimGvIVypJo,10434
3
3
  bbot/core/__init__.py,sha256=l255GJE_DvUnWvrRb0J5lG-iMztJ8zVvoweDOfegGtI,46
4
4
  bbot/core/config/__init__.py,sha256=zYNw2Me6tsEr8hOOkLb4BQ97GB7Kis2k--G81S8vofU,342
@@ -105,7 +105,7 @@ bbot/modules/github_org.py,sha256=O1VBn65sYJaPWBDjssyQSnlEh6XQgLEF7gKDzWj64qc,91
105
105
  bbot/modules/github_workflows.py,sha256=GvEVEa2vp5FnpKIthyMIkMmV84Sgh9whxpCcdFY1PB0,9555
106
106
  bbot/modules/gitlab.py,sha256=9oWWpBijeHCjuFBfWW4HvNqt7bvJvrBgBjaaz_UPPnE,5964
107
107
  bbot/modules/google_playstore.py,sha256=N4QjzQag_bgDXfX17rytBiiWA-SQtYI2N0J_ZNEOdv0,3701
108
- bbot/modules/gowitness.py,sha256=VYifohEuiIWTejzxM6kxpB8vcWTaiYgwdEeoiLWjZ9g,11071
108
+ bbot/modules/gowitness.py,sha256=DG23F2O4zVhY4lMSEk6uRRbQ-Jczpa6Yz_vXBICY9tA,11294
109
109
  bbot/modules/hackertarget.py,sha256=brp0khcRaSyzwjs6z89WbgULZEE8RmjLM_SxBrj3fDo,969
110
110
  bbot/modules/host_header.py,sha256=JQGqdsuvaCwFaA5_9790T1P2DKJoDUQSPjyHgh6u2tU,7694
111
111
  bbot/modules/httpx.py,sha256=wmgyRyCNg9vw_qO0pVo7I7QzGybDgt9pEdfU3QPgBMA,7588
@@ -179,7 +179,7 @@ bbot/modules/templates/shodan.py,sha256=BfI0mNPbqkykGmjMtARhmCGKmk1uq7yTlZoPgzzJ
179
179
  bbot/modules/templates/subdomain_enum.py,sha256=lT5MZF66OuzsyFFrj20wKlsZflzL9MOkPjDIbN3o65o,8375
180
180
  bbot/modules/templates/webhook.py,sha256=MYhKWrNYrsfM0a4PR6yVotudLyyCwgmy2eI-l9LvpBs,3706
181
181
  bbot/modules/trickest.py,sha256=HfAzjnawxXd9ypi3gumDHqImE5-C7uwNugo8d_b9HT0,1544
182
- bbot/modules/trufflehog.py,sha256=oQ4izommvSn4RSSA2y5srwEtOmXg8x0J90MP5MbSOnc,8555
182
+ bbot/modules/trufflehog.py,sha256=aVA1g3WvS1QifXqGMmdtjEeRA83z9C-y7s5PGnAS9Vs,8554
183
183
  bbot/modules/unstructured.py,sha256=si3_Y__A36QOBdkIUocVXCHrmUqM0E-JSnoOeRpELYE,5311
184
184
  bbot/modules/url_manipulation.py,sha256=BI-OhlzNzP5xvwzHphL4qdehc4NiEYnL2BNK-JoEm90,4322
185
185
  bbot/modules/urlscan.py,sha256=ajhiX2sj-zZDlKU1q5rE8JTzxioj1mDLqZ9PRSQCpAw,3741
@@ -395,8 +395,8 @@ bbot/wordlists/raft-small-extensions-lowercase_CLEANED.txt,sha256=ruUQwVfia1_m2u
395
395
  bbot/wordlists/top_open_ports_nmap.txt,sha256=LmdFYkfapSxn1pVuQC2LkOIY2hMLgG-Xts7DVtYzweM,42727
396
396
  bbot/wordlists/valid_url_schemes.txt,sha256=VciB-ww0y-O8Ii1wpTR6rJzGDiC2r-dhVsIJApS1ZYU,3309
397
397
  bbot/wordlists/wordninja_dns.txt.gz,sha256=DYHvvfW0TvzrVwyprqODAk4tGOxv5ezNmCPSdPuDUnQ,570241
398
- bbot-2.1.1.5121rc0.dist-info/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
399
- bbot-2.1.1.5121rc0.dist-info/METADATA,sha256=9f_8F2lY7bg5YDwxr9rpY9BzGeHGAu2enX_BKFn0QsI,16930
400
- bbot-2.1.1.5121rc0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
401
- bbot-2.1.1.5121rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
402
- bbot-2.1.1.5121rc0.dist-info/RECORD,,
398
+ bbot-2.1.1.5125rc0.dist-info/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
399
+ bbot-2.1.1.5125rc0.dist-info/METADATA,sha256=h5FzQreSp-yVd5XnvwLM1UIJmtPiVQMSlSdbv7yO8UE,16930
400
+ bbot-2.1.1.5125rc0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
401
+ bbot-2.1.1.5125rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
402
+ bbot-2.1.1.5125rc0.dist-info/RECORD,,