Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Nov 14, 2023
1 parent 45df5ae commit 9618739
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ class TestFileDownload(ModuleTestBase):
3 0 obj<</Parent 2 0 R>>endobj
trailer <</Root 1 0 R>>"""

async def setup_before_prep(self, module_test):
module_test.httpx_mock.add_response(
url="https://raw.githubusercontent.com/jshttp/mime-db/master/db.json",
json={
"application/pdf": {"source": "iana", "compressible": False, "extensions": ["pdf"]},
},
)

async def setup_after_prep(self, module_test):
module_test.set_expect_requests(
dict(uri="/"),
Expand Down
6 changes: 0 additions & 6 deletions bbot/test/test_step_2/module_tests/test_module_massdns.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ class TestMassdns(ModuleTestBase):
subdomain_wordlist = tempwordlist(["www", "asdf"])
config_overrides = {"modules": {"massdns": {"wordlist": str(subdomain_wordlist)}}}

async def setup_before_prep(self, module_test):
module_test.httpx_mock.add_response(
url="https://raw.githubusercontent.com/blacklanternsecurity/public-dns-servers/master/nameservers.txt",
text="8.8.8.8\n8.8.4.4\n1.1.1.1",
)

def check(self, module_test, events):
assert any(e.data == "www.blacklanternsecurity.com" for e in events)
assert not any(e.data == "asdf.blacklanternsecurity.com" for e in events)
8 changes: 0 additions & 8 deletions bbot/test/test_step_2/module_tests/test_module_secretsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ class TestSecretsDB(ModuleTestBase):
modules_overrides = ["httpx", "secretsdb"]

async def setup_before_prep(self, module_test):
module_test.httpx_mock.add_response(
url="https://raw.githubusercontent.com/blacklanternsecurity/secrets-patterns-db/master/db/rules-stable.yml",
text="""patterns:
- pattern:
confidence: 99
name: Asymmetric Private Key
regex: '-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----'""",
)
expect_args = {"method": "GET", "uri": "/"}
respond_args = {"response_data": "-----BEGIN PGP PRIVATE KEY BLOCK-----"}
module_test.set_expect_requests(expect_args=expect_args, respond_args=respond_args)
Expand Down
19 changes: 0 additions & 19 deletions bbot/test/test_step_2/module_tests/test_module_subdomain_hijack.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,6 @@ class TestSubdomain_Hijack(ModuleTestBase):
targets = ["http://127.0.0.1:8888"]
modules_overrides = ["httpx", "excavate", "subdomain_hijack"]

async def setup_before_prep(self, module_test):
module_test.httpx_mock.add_response(
url="https://raw.githubusercontent.com/EdOverflow/can-i-take-over-xyz/master/fingerprints.json",
json=[
{
"cicd_pass": True,
"cname": ["us-east-1.elasticbeanstalk.com"],
"discussion": "[Issue #194](https://github.com/EdOverflow/can-i-take-over-xyz/issues/194)",
"documentation": "",
"fingerprint": "NXDOMAIN",
"http_status": None,
"nxdomain": True,
"service": "AWS/Elastic Beanstalk",
"status": "Vulnerable",
"vulnerable": True,
}
],
)

async def setup_after_prep(self, module_test):
fingerprints = module_test.module.fingerprints
assert fingerprints, "No subdomain hijacking fingerprints available"
Expand Down

0 comments on commit 9618739

Please sign in to comment.