MCPcopy
hub / github.com/DedSecInside/TorBot / execute_all

Function execute_all

torbot/modules/info.py:35–58  ·  view source on GitHub ↗

Initialise datasets and functions to retrieve data, and execute each for a given link. Args: link (str): Link to be interogated. display_status (bool, optional): Whether to print connection attempts to terminal.

(client: httpx.Client, link: str, *, display_status: bool = False)

Source from the content-addressed store, hash-verified

33
34
35def execute_all(client: httpx.Client, link: str, *, display_status: bool = False) -> None:
36 """Initialise datasets and functions to retrieve data, and execute
37 each for a given link.
38
39 Args:
40 link (str): Link to be interogated.
41 display_status (bool, optional): Whether to print connection
42 attempts to terminal.
43 """
44
45 resp = client.get(url=link)
46 soup = BeautifulSoup(resp.text, 'html.parser')
47 validation_functions = [
48 get_robots_txt, get_dot_git, get_dot_svn, get_dot_git, get_intel, get_dot_htaccess, get_bitcoin_address
49 ]
50 for validate_func in validation_functions:
51 try:
52 validate_func(client, link, resp)
53 except Exception as e:
54 logging.debug(e)
55 cprint('Error', 'red')
56
57 display_webpage_description(soup)
58 # display_headers(response)
59
60
61def display_headers(response):

Callers 1

runFunction · 0.90

Calls 1

Tested by

no test coverage detected