Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonCatalyst committed Apr 29, 2024
1 parent 6a1f4f0 commit a5e4dec
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions ominis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
import logging
import os
import random
import urllib.parse
import subprocess
import httpx
import urllib.parse
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

Expand All @@ -29,18 +27,14 @@
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()

# Handle output or errors if needed.
if stdout:
print(f'[stdout]\n{stdout.decode()}')
if stderr:
Expand Down Expand Up @@ -87,7 +81,7 @@ async def main():
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")
logger.info(f" {Fore.RED}>|{Fore.WHITE} {Fore.GREEN}Proxies validated successfully{Fore.RED}.{Fore.WHITE}\n")

query = input(f" {Fore.RED}[{Fore.YELLOW}!{Fore.RED}]{Fore.WHITE} Enter the query to search{Fore.YELLOW}: {Fore.WHITE}")
await fetch_google_results(query, valid_proxies)
Expand All @@ -102,5 +96,3 @@ def clear_screen():

if __name__ == "__main__":
asyncio.run(main())


0 comments on commit a5e4dec

Please sign in to comment.