-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathominis.py
More file actions
133 lines (104 loc) · 4.93 KB
/
Copy pathominis.py
File metadata and controls
133 lines (104 loc) · 4.93 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
import asyncio
import logging
import os
import random
import subprocess
import time
from colorama import Fore, Style, init
from fake_useragent import UserAgent
from ominis_src.proxy_handler import scrape_proxies # Only import scrape_proxies
from ominis_src.tools_handler import fetch_dual_engine_results
from ominis_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():
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}")
try:
user_input = input(f"\n{Fore.RED}[{Fore.YELLOW}!{Fore.RED}]{Fore.WHITE} {prompt}: {Fore.WHITE}")
except EOFError:
user_input = ""
# 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 and country parameters are now informational only
language = await get_user_input("Enter language code (optional)", ["e.g., en (English)", "e.g., es (Spanish)", "e.g., fr (French)", "e.g., de (German)"])
country = await get_user_input("Enter country code (optional)", ["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
print(f'{Fore.RED}_' * 80)
print(f" {Fore.RED}[{Fore.GREEN}+{Fore.RED}]{Fore.WHITE} Beginning proxy harvesting operation{Fore.RED}.{Fore.WHITE}\n")
start_time = time.time()
proxies = await scrape_proxies()
if not proxies:
logger.error(f" {Fore.RED}No proxies scraped. Exiting...{Style.RESET_ALL}")
return
else:
print(f"✨ Total proxies harvested: {Fore.GREEN}{len(proxies)}{Style.RESET_ALL}")
print(f" {Fore.RED}[{Fore.GREEN}+{Fore.RED}]{Fore.WHITE} Beginning ghost validation of proxies{Fore.RED}.{Fore.WHITE}\n")
# Load valid proxies from file (generated by proxy_handler)
try:
with open("config/valid_proxies.txt", "r") as f:
valid_proxies = [line.strip() for line in f.readlines()]
logger.info(f" >| {Fore.GREEN}Loaded {len(valid_proxies)} validated proxies{Fore.RED}.{Fore.WHITE}\n")
except FileNotFoundError:
logger.error(f" {Fore.RED}No valid proxies found. Exiting...{Fore.WHITE}")
return
# Updated function call with new parameters
await fetch_dual_engine_results(
query,
language=language,
country=country,
date_range=date_range,
proxies=valid_proxies
)
await asyncio.sleep(3) # Introduce delay between requests
subprocess.run(["/home/ant/.local/share/pipx/venvs/ominis-osint/bin/python", "-m", "ominis_src.usr", query])
def clear_screen():
os.system('cls' if os.name == 'nt' else 'clear')
def run():
asyncio.run(main())
if __name__ == "__main__":
run()