bbot 2.7.0.7116rc0__py3-none-any.whl → 2.7.1.7141rc0__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 +1 -1
- bbot/core/helpers/git.py +17 -0
- bbot/core/helpers/misc.py +1 -0
- bbot/modules/git_clone.py +8 -1
- bbot/modules/gitdumper.py +3 -13
- bbot/modules/graphql_introspection.py +4 -1
- bbot/modules/internal/unarchive.py +9 -3
- {bbot-2.7.0.7116rc0.dist-info → bbot-2.7.1.7141rc0.dist-info}/METADATA +5 -3
- {bbot-2.7.0.7116rc0.dist-info → bbot-2.7.1.7141rc0.dist-info}/RECORD +12 -11
- {bbot-2.7.0.7116rc0.dist-info → bbot-2.7.1.7141rc0.dist-info}/WHEEL +1 -1
- {bbot-2.7.0.7116rc0.dist-info → bbot-2.7.1.7141rc0.dist-info}/entry_points.txt +0 -0
- {bbot-2.7.0.7116rc0.dist-info → bbot-2.7.1.7141rc0.dist-info/licenses}/LICENSE +0 -0
bbot/__init__.py
CHANGED
bbot/core/helpers/git.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def sanitize_git_repo(repo_folder: Path):
|
|
5
|
+
# sanitizing the git config is infeasible since there are too many different ways to do evil things
|
|
6
|
+
# instead, we move it out of .git and into the repo folder, so we don't miss any secrets etc. inside
|
|
7
|
+
config_file = repo_folder / ".git" / "config"
|
|
8
|
+
if config_file.exists():
|
|
9
|
+
config_file.rename(repo_folder / "git_config_original")
|
|
10
|
+
# move the index file
|
|
11
|
+
index_file = repo_folder / ".git" / "index"
|
|
12
|
+
if index_file.exists():
|
|
13
|
+
index_file.rename(repo_folder / "git_index_original")
|
|
14
|
+
# move the hooks folder
|
|
15
|
+
hooks_folder = repo_folder / ".git" / "hooks"
|
|
16
|
+
if hooks_folder.exists():
|
|
17
|
+
hooks_folder.rename(repo_folder / "git_hooks_original")
|
bbot/core/helpers/misc.py
CHANGED
|
@@ -17,6 +17,7 @@ from unidecode import unidecode # noqa F401
|
|
|
17
17
|
from asyncio import create_task, gather, sleep, wait_for # noqa
|
|
18
18
|
from urllib.parse import urlparse, quote, unquote, urlunparse, urljoin # noqa F401
|
|
19
19
|
|
|
20
|
+
from .git import * # noqa F401
|
|
20
21
|
from .url import * # noqa F401
|
|
21
22
|
from ... import errors
|
|
22
23
|
from . import regexes as bbot_regexes
|
bbot/modules/git_clone.py
CHANGED
|
@@ -82,4 +82,11 @@ class git_clone(github):
|
|
|
82
82
|
return
|
|
83
83
|
|
|
84
84
|
folder_name = output.stderr.split("Cloning into '")[1].split("'")[0]
|
|
85
|
-
|
|
85
|
+
repo_folder = folder / folder_name
|
|
86
|
+
|
|
87
|
+
# sanitize the repo
|
|
88
|
+
# this moves the git config, index file, and hooks folder out of the .git folder to prevent nasty things
|
|
89
|
+
# Note: the index file can be regenerated by running "git checkout HEAD -- ."
|
|
90
|
+
self.helpers.sanitize_git_repo(repo_folder)
|
|
91
|
+
|
|
92
|
+
return repo_folder
|
bbot/modules/gitdumper.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
import regex as re
|
|
3
2
|
from pathlib import Path
|
|
4
3
|
from subprocess import CalledProcessError
|
|
5
4
|
from bbot.modules.base import BaseModule
|
|
@@ -35,7 +34,6 @@ class gitdumper(BaseModule):
|
|
|
35
34
|
else:
|
|
36
35
|
self.output_dir = self.scan.temp_dir / "git_repos"
|
|
37
36
|
self.helpers.mkdir(self.output_dir)
|
|
38
|
-
self.unsafe_regex = self.helpers.re.compile(r"^\s*fsmonitor|sshcommand|askpass|editor|pager", re.IGNORECASE)
|
|
39
37
|
self.ref_regex = self.helpers.re.compile(r"ref: refs/heads/([a-zA-Z\d_-]+)")
|
|
40
38
|
self.obj_regex = self.helpers.re.compile(r"[a-f0-9]{40}")
|
|
41
39
|
self.pack_regex = self.helpers.re.compile(r"pack-([a-f0-9]{40})\.pack")
|
|
@@ -131,7 +129,6 @@ class gitdumper(BaseModule):
|
|
|
131
129
|
else:
|
|
132
130
|
result = await self.git_fuzz(repo_url, repo_folder)
|
|
133
131
|
if result:
|
|
134
|
-
await self.sanitize_config(repo_folder)
|
|
135
132
|
await self.git_checkout(repo_folder)
|
|
136
133
|
codebase_event = self.make_event({"path": str(repo_folder)}, "FILESYSTEM", tags=["git"], parent=event)
|
|
137
134
|
await self.emit_event(
|
|
@@ -251,15 +248,6 @@ class gitdumper(BaseModule):
|
|
|
251
248
|
self.debug(f"Unable to download git files to {folder}")
|
|
252
249
|
return False
|
|
253
250
|
|
|
254
|
-
async def sanitize_config(self, folder):
|
|
255
|
-
config_file = folder / ".git/config"
|
|
256
|
-
if config_file.exists():
|
|
257
|
-
with config_file.open("r", encoding="utf-8", errors="ignore") as file:
|
|
258
|
-
content = file.read()
|
|
259
|
-
sanitized = await self.helpers.re.sub(self.unsafe_regex, r"# \g<0>", content)
|
|
260
|
-
with config_file.open("w", encoding="utf-8") as file:
|
|
261
|
-
file.write(sanitized)
|
|
262
|
-
|
|
263
251
|
async def git_catfile(self, hash, option="-t", folder=Path()):
|
|
264
252
|
command = ["git", "cat-file", option, hash]
|
|
265
253
|
try:
|
|
@@ -270,8 +258,10 @@ class gitdumper(BaseModule):
|
|
|
270
258
|
return output.stdout
|
|
271
259
|
|
|
272
260
|
async def git_checkout(self, folder):
|
|
261
|
+
self.helpers.sanitize_git_repo(folder)
|
|
273
262
|
self.verbose(f"Running git checkout to reconstruct the git repository at {folder}")
|
|
274
|
-
|
|
263
|
+
# we do "checkout head -- ." because the sanitization deletes the index file, and it needs to be reconstructed
|
|
264
|
+
command = ["git", "checkout", "HEAD", "--", "."]
|
|
275
265
|
try:
|
|
276
266
|
await self.run_process(command, env={"GIT_TERMINAL_PROMPT": "0"}, cwd=folder, check=True)
|
|
277
267
|
except CalledProcessError as e:
|
|
@@ -119,7 +119,10 @@ fragment TypeRef on __Type {
|
|
|
119
119
|
}
|
|
120
120
|
response = await self.helpers.request(**request_args)
|
|
121
121
|
if not response or response.status_code != 200:
|
|
122
|
-
self.debug(
|
|
122
|
+
self.debug(
|
|
123
|
+
f"Failed to get GraphQL schema for {url} "
|
|
124
|
+
f"{f'(status code {response.status_code})' if response else ''}"
|
|
125
|
+
)
|
|
123
126
|
continue
|
|
124
127
|
try:
|
|
125
128
|
response_json = response.json()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
|
+
from contextlib import suppress
|
|
2
3
|
from bbot.modules.internal.base import BaseInternalModule
|
|
3
4
|
from bbot.core.helpers.libmagic import get_magic_info, get_compression
|
|
4
5
|
|
|
@@ -62,15 +63,20 @@ class unarchive(BaseInternalModule):
|
|
|
62
63
|
context=f'extracted "{path}" to: {output_dir}',
|
|
63
64
|
)
|
|
64
65
|
else:
|
|
65
|
-
|
|
66
|
+
with suppress(OSError):
|
|
67
|
+
output_dir.rmdir()
|
|
66
68
|
|
|
67
69
|
async def extract_file(self, path, output_dir):
|
|
68
70
|
extension, mime_type, description, confidence = get_magic_info(path)
|
|
69
71
|
compression_format = get_compression(mime_type)
|
|
70
72
|
cmd_list = self.compression_methods.get(compression_format, [])
|
|
71
73
|
if cmd_list:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
# output dir must not already exist
|
|
75
|
+
try:
|
|
76
|
+
output_dir.mkdir(exist_ok=False)
|
|
77
|
+
except FileExistsError:
|
|
78
|
+
self.warning(f"Destination directory {output_dir} already exists, aborting unarchive for {path}")
|
|
79
|
+
return False
|
|
74
80
|
command = [s.format(filename=path, extract_dir=output_dir) for s in cmd_list]
|
|
75
81
|
try:
|
|
76
82
|
await self.run_process(command, check=True)
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: bbot
|
|
3
|
-
Version: 2.7.
|
|
3
|
+
Version: 2.7.1.7141rc0
|
|
4
4
|
Summary: OSINT automation for hackers.
|
|
5
5
|
License: GPL-3.0
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Keywords: python,cli,automation,osint,threat-intel,intelligence,neo4j,scanner,python-library,hacking,recursion,pentesting,recon,command-line-tool,bugbounty,subdomains,security-tools,subdomain-scanner,osint-framework,attack-surface,subdomain-enumeration,osint-tool
|
|
7
8
|
Author: TheTechromancer
|
|
8
9
|
Requires-Python: >=3.9,<4.0
|
|
@@ -14,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
19
|
Classifier: Topic :: Security
|
|
18
20
|
Requires-Dist: ansible-core (>=2.15.13,<3.0.0)
|
|
19
21
|
Requires-Dist: ansible-runner (>=2.3.2,<3.0.0)
|
|
@@ -21,7 +23,7 @@ Requires-Dist: beautifulsoup4 (>=4.12.2,<5.0.0)
|
|
|
21
23
|
Requires-Dist: cachetools (>=5.3.2,<7.0.0)
|
|
22
24
|
Requires-Dist: cloudcheck (>=7.2.11,<8.0.0)
|
|
23
25
|
Requires-Dist: deepdiff (>=8.0.0,<9.0.0)
|
|
24
|
-
Requires-Dist: dnspython (>=2.
|
|
26
|
+
Requires-Dist: dnspython (>=2.7.0,<2.8.0)
|
|
25
27
|
Requires-Dist: httpx (>=0.28.1,<0.29.0)
|
|
26
28
|
Requires-Dist: idna (>=3.4,<4.0)
|
|
27
29
|
Requires-Dist: jinja2 (>=3.1.3,<4.0.0)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
bbot/__init__.py,sha256=
|
|
1
|
+
bbot/__init__.py,sha256=IlaHx0rVovIdfUYk6uXNe9rCqfW7r4FVQMMWzKQftqQ,163
|
|
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
|
|
@@ -26,10 +26,11 @@ bbot/core/helpers/dns/engine.py,sha256=0VP53V8QDOlNZgZk2LPGetDQCuJxqFtAsWWw-jBqw
|
|
|
26
26
|
bbot/core/helpers/dns/helpers.py,sha256=aQroIuz5TxrCZ4zoplOaqLj3ZNgOgDRKn0xM8GKz2dA,8505
|
|
27
27
|
bbot/core/helpers/dns/mock.py,sha256=FCPrihu6O4kun38IH70RfktsXIKKfe0Qx5PMzZVUdsY,2588
|
|
28
28
|
bbot/core/helpers/files.py,sha256=vWxx5AfH8khboawBdUi-KYvbjpybSMLGZpixylitGMQ,5811
|
|
29
|
+
bbot/core/helpers/git.py,sha256=q2y25H9wow1-R7TMT4BBSVFzJpBzfGblAMxy9hGOCvw,757
|
|
29
30
|
bbot/core/helpers/helper.py,sha256=u-q_Ka9pY1atvC-FChxYpURM7b3_0gaCNIHSG__Wi74,8538
|
|
30
31
|
bbot/core/helpers/interactsh.py,sha256=VBYYH6-rWBofRsgemndK6iZNmyifOps8vgQOw2mac4k,12624
|
|
31
32
|
bbot/core/helpers/libmagic.py,sha256=QMHyxjgDLb2jyjBvK1MQ-xt6WkGXhKcHu9ZP1li-sik,3460
|
|
32
|
-
bbot/core/helpers/misc.py,sha256=
|
|
33
|
+
bbot/core/helpers/misc.py,sha256=9O0y76FZi4E8Frbip086Rip3dUS52y_qf03iwcv-5aM,89067
|
|
33
34
|
bbot/core/helpers/names_generator.py,sha256=zmo4MyuOnAYjiUDiORhq9T9bHmA_gW72Y2kHMAqVENU,10594
|
|
34
35
|
bbot/core/helpers/ntlm.py,sha256=BspNjNyKiWEqdqG3gYzYFyLsnCuzWyLOsguv1yBWLs0,2516
|
|
35
36
|
bbot/core/helpers/process.py,sha256=00uRpLMFi3Pt3uT8qXwAIhsXdoa7h-ifoXh0sGYgwqs,1702
|
|
@@ -104,8 +105,8 @@ bbot/modules/fingerprintx.py,sha256=rdlR9d64AntAhbS_eJzh8bZCeLPTJPSKdkdKdhH_qAo,
|
|
|
104
105
|
bbot/modules/fullhunt.py,sha256=2ntu1yBh51N4e_l-kpXc1UBoVVcxEE2JPkyaMYCuUb4,1336
|
|
105
106
|
bbot/modules/generic_ssrf.py,sha256=KFdcHpUV9-Z7oN7emzbirimsNc2xZ_1IFqnsfIkEbcM,9196
|
|
106
107
|
bbot/modules/git.py,sha256=zmHeI0bn181T1P8C55HSebkdVGLTpzGxPc-LRqiHrbc,1723
|
|
107
|
-
bbot/modules/git_clone.py,sha256=
|
|
108
|
-
bbot/modules/gitdumper.py,sha256=
|
|
108
|
+
bbot/modules/git_clone.py,sha256=SwtCnOpVqEgSMfqaN54NUpS2jYZWt4Fk8Y_TqUIO724,3764
|
|
109
|
+
bbot/modules/gitdumper.py,sha256=mzlEJuWLlZIWXj-0V5kC8qTVLEvVtbrPColCXQGFEoQ,11588
|
|
109
110
|
bbot/modules/github_codesearch.py,sha256=a-r2vE9N9WyBpFUiKCsg0TK4Qn7DaEGyVRTUKzkDLWA,3641
|
|
110
111
|
bbot/modules/github_org.py,sha256=WM18vJCHuOHJJ5rPzQzQ3Pmp7XPPuaMeVgNfW-FlO0k,8938
|
|
111
112
|
bbot/modules/github_usersearch.py,sha256=G8knkQBJsn7EKcMhcEaFPiB_Y5S96e2VaseBubsqOyk,3407
|
|
@@ -113,7 +114,7 @@ bbot/modules/github_workflows.py,sha256=xKntAFDeGuE4MqbEmhJyYXKbzoSh9tWYlHNlnF37
|
|
|
113
114
|
bbot/modules/gitlab.py,sha256=9oWWpBijeHCjuFBfWW4HvNqt7bvJvrBgBjaaz_UPPnE,5964
|
|
114
115
|
bbot/modules/google_playstore.py,sha256=N4QjzQag_bgDXfX17rytBiiWA-SQtYI2N0J_ZNEOdv0,3701
|
|
115
116
|
bbot/modules/gowitness.py,sha256=hMhCz4O1sDJCzCzRIcmu0uNDgDDf9JzkFBwL1WuUum0,13144
|
|
116
|
-
bbot/modules/graphql_introspection.py,sha256=
|
|
117
|
+
bbot/modules/graphql_introspection.py,sha256=Y-MqXrN6qmXTv2T6t7hJ-SU3R2guZQRWkrrCLC56bAc,4239
|
|
117
118
|
bbot/modules/hackertarget.py,sha256=IsKs9PtxUHdLJKZydlRdW_loBE2KphQYi3lKDAd4odc,1029
|
|
118
119
|
bbot/modules/host_header.py,sha256=uDjwidMdeNPMRfzQ2YW4REEGsZqnGOZHbOS6GgdNd9s,7686
|
|
119
120
|
bbot/modules/httpx.py,sha256=tlQ6NKw8FJ6rGaNI1BnwKqjxZFn1MZeItGZgNab_Ydo,8177
|
|
@@ -127,7 +128,7 @@ bbot/modules/internal/cloudcheck.py,sha256=IYVetq8YE--yio5DhxukjgshJwZ3EohIu6ZVw
|
|
|
127
128
|
bbot/modules/internal/dnsresolve.py,sha256=1fwWChIGpSEIIkswueiIhEwIahQ7YngZ-njFK-RIsfU,15679
|
|
128
129
|
bbot/modules/internal/excavate.py,sha256=L8tGdfdvxrvfskC1Ms9UtSy-gxudnQcW7Iv5tHNAbW4,63728
|
|
129
130
|
bbot/modules/internal/speculate.py,sha256=ua35Da-f0-fnK0oXtx4DeGJAT19bfqnmLfetSUfJnIk,9262
|
|
130
|
-
bbot/modules/internal/unarchive.py,sha256=
|
|
131
|
+
bbot/modules/internal/unarchive.py,sha256=tORk083jgbJAHdNLSLHlR1YtP0TrBBrTPWF67bnW1wk,4041
|
|
131
132
|
bbot/modules/ip2location.py,sha256=yGivX9fzvwvLpnqmYCP2a8SPjTarzrZxfRluog-nkME,2628
|
|
132
133
|
bbot/modules/ipneighbor.py,sha256=b_0IhorihFLtXJZEz57EGXjXW30gIOEzzVgz2GFvM3A,1591
|
|
133
134
|
bbot/modules/ipstack.py,sha256=j_S8WMNqQuSQgBT7AX4tO70fgbWuRYrpsS3tVsu_hn4,2200
|
|
@@ -463,8 +464,8 @@ bbot/wordlists/raft-small-extensions-lowercase_CLEANED.txt,sha256=ZSIVebs7ptMvHx
|
|
|
463
464
|
bbot/wordlists/top_open_ports_nmap.txt,sha256=LmdFYkfapSxn1pVuQC2LkOIY2hMLgG-Xts7DVtYzweM,42727
|
|
464
465
|
bbot/wordlists/valid_url_schemes.txt,sha256=0B_VAr9Dv7aYhwi6JSBDU-3M76vNtzN0qEC_RNLo7HE,3310
|
|
465
466
|
bbot/wordlists/wordninja_dns.txt.gz,sha256=DYHvvfW0TvzrVwyprqODAk4tGOxv5ezNmCPSdPuDUnQ,570241
|
|
466
|
-
bbot-2.7.
|
|
467
|
-
bbot-2.7.
|
|
468
|
-
bbot-2.7.
|
|
469
|
-
bbot-2.7.
|
|
470
|
-
bbot-2.7.
|
|
467
|
+
bbot-2.7.1.7141rc0.dist-info/METADATA,sha256=Uv1EDVGwZkIZ6uOrJl9vRIpwIBNCvP7V4c6PjfFV5eY,18420
|
|
468
|
+
bbot-2.7.1.7141rc0.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
469
|
+
bbot-2.7.1.7141rc0.dist-info/entry_points.txt,sha256=cWjvcU_lLrzzJgjcjF7yeGuRA_eDS8pQ-kmPUAyOBfo,38
|
|
470
|
+
bbot-2.7.1.7141rc0.dist-info/licenses/LICENSE,sha256=GzeCzK17hhQQDNow0_r0L8OfLpeTKQjFQwBQU7ZUymg,32473
|
|
471
|
+
bbot-2.7.1.7141rc0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|