🕵️♂️ (2-in-1) Email & Username OSINT suite featuring native MCP support for deep data extraction just from a single Email/Username. Analyzes 2720+ actively maintained scan vectors (210+ email / 2510+ username) for security research, investigations, and digital footprinting.
Python cybersecuritycybersecurity-toolsemail-osintethical-hackingethical-hacking-toolsidentificationinfosecosintosint-emailosint-toolosint-toolsosint-usernamepentestingpythonredteam-toolsredteamingthreat-intelligence
fix: preserve explicit proxy schemes when loading proxy file
shuofengzhangcbdd87d46f69
diff --git a/tests/test_helpers.py b/tests/test_helpers.pyindex 4e9013c..e11aebf 100644--- a/tests/test_helpers.py+++ b/tests/test_helpers.py@@ -269,6 +269,21 @@ socks5://socks-proxy.example.com:1080""")assert manager.proxies[1].startswith("socks5://")+def test_proxy_manager_preserves_explicit_schemes(tmp_path):+ proxy_file = tmp_path / "test_proxies.txt"+ proxy_file.write_text("""socks4://legacy-proxy.example.com:1080+socks5h://onion-proxy.example.com:9050+https://secure-proxy.example.com:443""")++ manager = helpers.ProxyManager(str(proxy_file))++ assert manager.proxies == [+ "socks4://legacy-proxy.example.com:1080",+ "socks5h://onion-proxy.example.com:9050",+ "https://secure-proxy.example.com:443",+ ]++def test_proxy_manager_no_poxy_file(tmp_path):with pytest.raises(FileNotFoundError) as exc_info:helpers.ProxyManager("no_proxy_file.txt")diff --git a/user_scanner/core/helpers.py b/user_scanner/core/helpers.pyindex 6b912f8..efbe92b 100644--- a/user_scanner/core/helpers.py+++ b/user_scanner/core/helpers.py@@ -155,14 +155,15 @@ class ProxyManager:self._load_proxies(proxy_file)def _load_proxies(self, proxy_file: str) -> None:- """Load proxies from a text file. Supports http://, https://, and socks5:// proxies."""+ """Load proxies from a text file. Keep explicit schemes, default to http:// when missing."""try:with open(proxy_file, "r", encoding="utf-8") as f:for line in f:line = line.strip()if line and not line.startswith("#"):- # Add protocol if not present- if not line.startswith(("http://", "https://", "socks5://")):+ # Keep explicit schemes (http://, socks5://, socks5h://, etc.).+ # Only prepend http:// when no scheme is provided.+ if "://" not in line:line = "http://" + lineself.proxies.append(line)