MCPcopy Create free account

hub / github.com/G4LB1T/pstf2 / functions

Functions20 in github.com/G4LB1T/pstf2

↓ 2 callersFunctionget_os_string
:param s: user agent or p0f OS fingerprint :return: assumed OS parsed out of the input string
lib/utils.py:46
↓ 1 callersFunctioncheck_blacklist_asn
Is the ASN suspicious? :param request: :return: True iff ASN hints it is a security tool
lib/fingerprinting/blacklist_checks.py:122
↓ 1 callersFunctioncheck_last_sec_service_observed_timeout
:return: True iff we've recently seen a service checking our server
lib/fingerprinting/blacklist_checks.py:190
↓ 1 callersFunctioncheck_link_is_ethernet
Checks if the MTU value is atypical :param request: the HTTP GET headers :return: True iff MTU value is suspicious
lib/fingerprinting/blacklist_checks.py:136
↓ 1 callersFunctioncheck_obsolete_browser_version
Detect implementations where developers neglected to update their code to reflect contemporary browser versions :param request: :return:
lib/fingerprinting/blacklist_checks.py:168
↓ 1 callersFunctioncheck_os_mismatches
Compare the declared OS and TCP metadata OS Uses get_os_string to transform to a canonical form :param request: the HTTP GET headers
lib/fingerprinting/blacklist_checks.py:150
↓ 1 callersFunctioncheck_virus_total_ua
:param request: :return: true iff VirusTotal request is received
lib/fingerprinting/blacklist_checks.py:94
↓ 1 callersFunctionget_asn
Gets asnum for ip using Cymru's API (https://pythonhosted.org/cymruwhois/api.html) Stores in cache for future use using the lru_cache dec
lib/fingerprinting/asn_checker.py:10
↓ 1 callersFunctionget_p0f_data
Wraps p0f's named socket API Wrapper module in use is https://pypi.org/project/p0f/ :param ip: key to query p0f by it :return: p0f's
lib/servers/p0f_wrapper.py:27
↓ 1 callersFunctionget_ptr_record
:param ip: ipv4 as string :return: reversed in-addr-arpa part of the record e.g.: for '203.208.60.1' it will return 'crawl-203-208-60-1.g
lib/utils.py:32
↓ 1 callersMethodparse_headers
build parsed headers from request :return: headers prepared for fingerprinting stage
lib/servers/http_server.py:16
↓ 1 callersFunctionprint_banner
Prints an ASCII art pstf^2 banner :return: None
lib/utils.py:68
↓ 1 callersFunctionreset_last_time_service_observed
Resets the timer for last time we've observed a service to evade from :return:
lib/fingerprinting/blacklist_checks.py:18
↓ 1 callersFunctionrun
Wrapper for popen :param cmd: cmd to run as a different process :return: ref to the popened subprocess
lib/utils.py:22
↓ 1 callersFunctionstart_logger
(lvl=logging.INFO)
lib/utils.py:8
↓ 1 callersFunctionstart_servers
Here we start both p0f and an HTTP server in parallel :return:
lib/servers/__init__.py:10
Methoddo_GET
Logic for serving HTTP GET requests :return:
lib/servers/http_server.py:36
Functiondo_checks
Main routine for sending to the different checks :param request: :return: True iff request matches blacklist patterns
lib/fingerprinting/blacklist_checks.py:27
Functionstart_http_server
Initialize the server, will be started in a differnt thread than p0f so it will co-exist :param server_class: standard python HTTP server
lib/servers/http_server.py:74
Functionstart_p0f
Starts p0f's binary :param p0f_bin_path: binary file path on disk :param p0f_fp_path: fingerprint file path on disk :param p0f_iface:
lib/servers/p0f_wrapper.py:12