Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonCatalyst authored Sep 18, 2024
1 parent 7f90d9e commit 422e176
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 57 deletions.
92 changes: 52 additions & 40 deletions ominis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
import logging
import os
import random
import urllib.parse
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
Expand All @@ -29,47 +30,72 @@
counter_emojis = ['🍻', '📑', '📌', '🌐', '🔰', '💀', '🔍', '📮', 'ℹ️', '📂', '📜', '📋', '📨', '🌟', '💫', '✨', '🔥', '🆔', '🎲']
emoji = random.choice(counter_emojis) # Select a random emoji for the counter

query = None

async def run_command(command):
process = await asyncio.create_subprocess_shell(
command,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE)

# Wait for the subprocess to complete.
stdout, stderr = await process.communicate()
# Keep track of user inputs
user_inputs = {}

# Handle output or errors if needed.
if stdout:
print(f'[stdout]\n{stdout.decode()}')
if stderr:
print(f'[stderr]\n{stderr.decode()}')


async def main():
clear_screen()
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.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}
{Fore.YELLOW}~ {Fore.CYAN}Instagram{Fore.YELLOW}:{Fore.BLUE} https://www.instagram.com/istoleyourbutter/{Fore.RED}
{Fore.RED}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{Fore.YELLOW}~ {Fore.CYAN}Website{Fore.YELLOW}:{Fore.BLUE} https:/hard2find.dev/{Fore.RED}""")
{Fore.YELLOW}~ {Fore.CYAN}Website{Fore.YELLOW}:{Fore.BLUE} https://hard2find.dev/{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

print(f"{Fore.RED}_" * 80 + "\n")
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:
logger.info(
f" {Fore.RED}[{Fore.GREEN}+{Fore.RED}]{Fore.WHITE} Beginning proxy validation for proxy rotation{Fore.RED}.{Fore.WHITE}\n")
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:
Expand All @@ -78,28 +104,14 @@ async def main():
else:
logger.info(f" >| {Fore.GREEN}Proxies validated successfully{Fore.RED}.{Fore.WHITE}\n")


print(f"{Fore.RED}_" * 80 + "\n")
query = input(f" {Fore.RED}[{Fore.YELLOW}!{Fore.RED}]{Fore.WHITE} Enter the query to search{Fore.YELLOW}: {Fore.WHITE}")
language = input(f" {Fore.RED}[{Fore.YELLOW}!{Fore.RED}]{Fore.WHITE} Enter the language code (e.g., 'lang_en' for English){Fore.YELLOW}: {Fore.WHITE} ")
country = input(f" {Fore.RED}[{Fore.YELLOW}!{Fore.RED}]{Fore.WHITE} Enter the country code (e.g., 'countryUS' for United States){Fore.YELLOW}: {Fore.WHITE} ")
start_date = input(f" {Fore.RED}[{Fore.YELLOW}!{Fore.RED}]{Fore.WHITE} Enter the start date for the date range (MM/DD/YYYY){Fore.YELLOW}: {Fore.WHITE} ")
end_date = input(f" {Fore.RED}[{Fore.YELLOW}!{Fore.RED}]{Fore.WHITE} Enter the end date for the date range (MM/DD/YYYY){Fore.YELLOW}: {Fore.WHITE} ")
date_range = (start_date, end_date)
print(f"{Fore.RED}_" * 80 + "\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())


39 changes: 22 additions & 17 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
beautifulsoup4
colorama
fake_useragent
requests
serpapi
google-search-results
httpx
tenacity
requests_html
aiohttp
urllib3
asyncio
lxml_html_clean
html_clean
tqdm
anyio>=4.4.0 # not directly required, pinned by Snyk to avoid a vulnerability
zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability
beautifulsoup4==4.12.2
colorama==0.4.6
requests==2.31.0
serpapi==2.13.0
google-search-results==2.2.0
httpx==0.24.0
tenacity==8.2.2
requests_html==0.10.0
aiohttp==3.8.4
urllib3==1.26.14
asyncio==3.4.3
lxml_html_clean==0.1.4
html_clean==0.1.1
anyio>=4.4.0
zipp>=3.19.1
validators==0.20.0
tqdm==4.65.0
tqdm-asyncio==0.0.6
ipwhois==1.0.0
fake-useragent==1.1.2
PyQt6==6.5.0

0 comments on commit 422e176

Please sign in to comment.