@@ -146,6 +146,7 @@ Key helpers:
146146| Helper | What it does |
147147| --------| -------------|
148148| ` self.helpers.request(url) ` | Make an HTTP request (with retries, SSL handling, etc.) |
149+ | ` self.helpers.blasthttp ` | Shared blasthttp client (rate-limited via ` web.http_rate_limit ` config) |
149150| ` self.helpers.resolve(host) ` | DNS resolution |
150151| ` self.helpers.is_ip(s) ` | Check if string is an IP |
151152| ` self.helpers.is_dns_name(s) ` | Check if string is a hostname |
@@ -219,7 +220,7 @@ from .base import ModuleTestBase
219220
220221class TestMyModule (ModuleTestBase ):
221222 async def setup_after_prep (self , module_test ):
222- module_test.httpx_mock .add_response(
223+ module_test.blasthttp_mock .add_response(
223224 url = " https://api.example.com/lookup?domain=blacklanternsecurity.com" ,
224225 json = {" emails" : [" info@blacklanternsecurity.com" ]},
225226 )
@@ -370,7 +371,7 @@ Whether to process seed events (the initial targets provided to the scan).
370371Whether to accept "special" URLs (e.g. JavaScript files) that are not normally distributed to web modules.
371372
372373``` python
373- # httpx .py - needs to process all URLs including special ones
374+ # http .py - needs to process all URLs including special ones
374375accept_url_special = True
375376```
376377
@@ -535,7 +536,7 @@ _preserve_graph = True
535536Exclude this module from scan statistics. Used by output and report modules.
536537
537538##### ` _disable_auto_module_deps ` (bool) -- default: ` False `
538- Prevent BBOT from automatically enabling dependency modules. For example, if your module watches ` URL ` events, BBOT normally auto-enables ` httpx ` . Set this to ` True ` to prevent that.
539+ Prevent BBOT from automatically enabling dependency modules. For example, if your module watches ` URL ` events, BBOT normally auto-enables ` http ` . Set this to ` True ` to prevent that.
539540
540541---
541542
@@ -875,7 +876,7 @@ class TestMyModule(ModuleTestBase):
875876 targets = [" http://127.0.0.1:8888" ]
876877
877878 # Optional: override which modules are enabled
878- modules_overrides = [" httpx " , " my_module" ]
879+ modules_overrides = [" http " , " my_module" ]
879880
880881 # Optional: override config
881882 config_overrides = {" modules" : {" my_module" : {" some_option" : True }}}
@@ -887,7 +888,7 @@ class TestMyModule(ModuleTestBase):
887888 async def setup_after_prep (self , module_test ):
888889 """ Called AFTER the scan is prepared. Modify modules, add mocks here."""
889890 # Mock an HTTP response
890- module_test.httpx_mock .add_response(
891+ module_test.blasthttp_mock .add_response(
891892 url = " https://api.example.com/lookup?domain=blacklanternsecurity.com" ,
892893 json = {" results" : [" sub.blacklanternsecurity.com" ]},
893894 )
@@ -920,7 +921,7 @@ The test lifecycle runs:
920921
921922### Test Utilities
922923
923- - ** ` module_test.httpx_mock ` ** - mock HTTP responses (from pytest-httpx)
924+ - ** ` module_test.blasthttp_mock ` ** - mock HTTP responses
924925- ** ` module_test.httpserver ` ** - real HTTP server on port 8888
925926- ** ` module_test.httpserver_ssl ` ** - real HTTPS server on port 9999
926927- ** ` module_test.mock_dns(data) ` ** - mock DNS responses
@@ -933,7 +934,7 @@ Real example -- `test_module_robots.py`:
933934``` python
934935class TestRobots (ModuleTestBase ):
935936 targets = [" http://127.0.0.1:8888" ]
936- modules_overrides = [" httpx " , " robots" ]
937+ modules_overrides = [" http " , " robots" ]
937938 config_overrides = {" modules" : {" robots" : {" include_sitemap" : True }}}
938939
939940 async def setup_after_prep (self , module_test ):
0 commit comments