-
Notifications
You must be signed in to change notification settings - Fork 25
/
ominis.py
116 lines (88 loc) · 4.26 KB
/
ominis.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import asyncio
import logging
import os
import random
import subprocess
import httpx
from colorama import Fore, Style, init
from fake_useragent import UserAgent
from bs4 import BeautifulSoup
from src.proxy_handler import scrape_proxies, validate_proxies
from src.tools_handler import fetch_google_results
from src.utils import find_social_profiles, is_potential_forum, extract_mentions
# Suppress InsecureRequestWarning
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# Logging configuration
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
init(autoreset=True) # Initialize colorama for colored output
DEFAULT_NUM_RESULTS = 500
MAX_RETRY_COUNT = 5
counter_emojis = ['🍻', '📑', '📌', '🌐', '🔰', '💀', '🔍', '📮', 'ℹ️', '📂', '📜', '📋', '📨', '🌟', '💫', '✨', '🔥', '🆔', '🎲']
emoji = random.choice(counter_emojis) # Select a random emoji for the counter
# Keep track of user inputs
user_inputs = {}
def display_banner():
print(
f"""
{Fore.YELLOW} {Fore.WHITE}🇴🇲🇮🇳🇮🇸-🇴🇸🇮🇳🇹 {Fore.YELLOW}- {Fore.RED}[{Fore.WHITE}Secure Web-Hunter{Fore.RED}]
{Fore.RED} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{Fore.YELLOW}~ {Fore.CYAN}Developer{Fore.YELLOW}: {Fore.WHITE} AnonCatalyst {Fore.MAGENTA}<{Fore.RED}
{Fore.RED}------------------------------------------
{Fore.YELLOW}~ {Fore.CYAN}Github{Fore.YELLOW}:{Fore.BLUE} https://github.com/AnonCatalyst/{Fore.RED}
{Fore.RED}------------------------------------------
{Fore.YELLOW}~ {Fore.CYAN}Instagram{Fore.YELLOW}:{Fore.BLUE} https://www.instagram.com/istoleyourbutter/{Fore.RED}
""")
async def get_user_input(prompt, options=None):
clear_screen()
# Display the banner
display_banner()
# Display current input statistics
print(f'{Fore.RED}_' * 80)
print(f"{Fore.RED}Input Statistics:{Fore.WHITE}")
for key, value in user_inputs.items():
# Display current input statistics
print(f"{Fore.YELLOW}{key}: {Fore.WHITE}{value}")
if options:
print(f"\n{Fore.RED}Options (examples):{Fore.WHITE}")
for option in options:
print(f" - {option}")
user_input = input(f"\n{Fore.RED}[{Fore.YELLOW}!{Fore.RED}]{Fore.WHITE} {prompt}: {Fore.WHITE}")
# Save input
user_inputs[prompt] = user_input
print(f"{Fore.RED}You entered: {Fore.WHITE}{user_input}\n")
await asyncio.sleep(1) # Short delay to let user see the prompt
return user_input
async def main():
clear_screen()
display_banner()
await asyncio.sleep(2) # Delay to let user read the information
query = await get_user_input("Enter the query to search")
language = await get_user_input("Enter language code (e.g., lang_en)", ["e.g., lang_en (English)", "e.g., lang_es (Spanish)", "e.g., lang_fr (French)", "e.g., lang_de (German)"])
country = await get_user_input("Enter country code (e.g., US)", ["e.g., US (United States)", "e.g., CA (Canada)", "e.g., GB (United Kingdom)", "e.g., AU (Australia)"])
start_date = await get_user_input("Enter start date (YYYY-MM-DD)")
end_date = await get_user_input("Enter end date (YYYY-MM-DD)")
# Validate and format date_range
date_range = (start_date, end_date)
# Proceed with scraping and validation
proxies = await scrape_proxies()
if not proxies:
logger.error(f" {Fore.RED}No proxies scraped. Exiting...{Style.RESET_ALL}")
return
else:
print(f'{Fore.RED}_' * 80)
print(f" {Fore.RED}[{Fore.GREEN}+{Fore.RED}]{Fore.WHITE} Beginning proxy validation for proxy rotation{Fore.RED}.{Fore.WHITE}\n")
valid_proxies = await validate_proxies(proxies)
if not valid_proxies:
logger.error(f" {Fore.RED}No valid proxies found. Exiting...{Fore.WHITE}")
return
else:
logger.info(f" >| {Fore.GREEN}Proxies validated successfully{Fore.RED}.{Fore.WHITE}\n")
await fetch_google_results(query, language, country, date_range, valid_proxies)
await asyncio.sleep(3) # Introduce delay between requests
subprocess.run(["python3", "-m", "src.usr", query])
def clear_screen():
os.system('cls' if os.name == 'nt' else 'clear')
if __name__ == "__main__":
asyncio.run(main())