Created
January 19, 2025 18:00
-
-
Save Stormix/a4d3e23b64b8b8c42bc71e98b022bfe9 to your computer and use it in GitHub Desktop.
Enumerate all victim phone numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
import signal | |
from concurrent.futures import ThreadPoolExecutor | |
import urllib3 | |
urllib3.disable_warnings() | |
domains = [ | |
# "https://order-page9553.world/p/33", | |
"https://inform-vrf234984.cfd/33", | |
] | |
# Add these variables at global scope | |
valid_urls = set() | |
should_exit = False | |
def signal_handler(signum, frame): | |
global should_exit | |
print("\nCTRL+C received. Stopping gracefully...") | |
print("\nValid URLs found:") | |
for url in valid_urls: | |
print(url) | |
should_exit = True | |
def check_link(phone_number): | |
if should_exit: | |
return | |
for base_url in domains: | |
url = f"{base_url}{phone_number}" | |
try: | |
# Adding headers to mimic a browser request | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' | |
} | |
response = requests.get(url, headers=headers, timeout=5, verify=False) | |
print(f"{url} - [{response.status_code}]") | |
if response.status_code == 200: | |
print(f"[LIVE] {url}") | |
valid_urls.add(url) | |
# Optionally save live links to a file | |
with open('live_links.txt', 'a') as f: | |
f.write(f"{url}\n") | |
except requests.RequestException as e: | |
# print(f"[FAILED] {url} - {str(e)}") | |
pass | |
# Be nice to the server | |
time.sleep(0.5) | |
def get_last_number(): | |
try: | |
with open('progress.txt', 'r') as f: | |
return int(f.read().strip()) | |
except FileNotFoundError: | |
return 600000000 | |
def save_progress(number): | |
with open('progress.txt', 'w') as f: | |
f.write(str(number)) | |
def enumerate_french_links(): | |
start_number = get_last_number() | |
print(f"Starting from number: {start_number}") | |
with ThreadPoolExecutor(max_workers=10) as executor: | |
for number in range(start_number, 799999999): | |
if should_exit: | |
save_progress(number) | |
break | |
phone_number = f"{number}" | |
executor.submit(check_link, phone_number) | |
# Save progress periodically (every 1000 numbers) | |
if number % 1000 == 0: | |
save_progress(number) | |
def test_specific_number(): | |
print("Testing specific number first...") | |
check_link("XXXXXXXXXX") | |
if len(valid_urls) > 0: | |
print("\nTest number is valid! Found:") | |
for url in valid_urls: | |
print(url) | |
else: | |
print("\nTest number is not valid.") | |
response = input("\nContinue with full enumeration? (y/n): ") | |
return response.lower() == 'y' | |
if __name__ == "__main__": | |
# Register the signal handler | |
signal.signal(signal.SIGINT, signal_handler) | |
if test_specific_number(): | |
print("\nStarting enumeration of French phone numbers...") | |
print("Live links will be saved to 'live_links.txt'") | |
print("Press CTRL+C to stop and show valid URLs") | |
enumerate_french_links() | |
else: | |
print("Exiting...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment