-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
75 lines (59 loc) · 2.67 KB
/
main.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
#!/usr/bin/python
# coding=utf-8
# Author github.com/Eltotiz
import requests
from bs4 import BeautifulSoup
from colorama import init, Fore, Style
import os
import fade
init()
naranja = "\x1b[38;2;255;165;0m"
violeta = "\x1b[38;2;138;43;226m"
def clear():
if os.name == "posix":
os.system ("clear")
elif os.name == ("ce", "nt", "dos"):
os.system ("cls")
banner = """
*****************************************************************************
████████ ██████ ██████ ███████ ███████ █████ ██████ ██████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██████ ███████ █████ ███████ ██████ ██ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██████ ██ ██ ███████ ███████ ██ ██ ██ ██ ██████ ██ ██
Created by github.com/eltotiz
****************************************************************************"""
while True:
session = requests.session()
session.proxies = {
'http': 'socks5h://127.0.0.1:9050',
'https': 'socks5h://127.0.0.1:9050'
}
clear()
print("Starting TORSEARCH...")
api_url = "https://api.ipify.org?format=json"
responseIP = session.get(api_url)
clear()
faded_text = fade.purplepink(banner)
print(faded_text)
print(Fore.LIGHTRED_EX + " [!] SECRET IP >", responseIP.json()['ip'] + Fore.RESET)
search = input(violeta + " [TORSEARCH] > ")
print("")
url = f"http://xmh57jrknzkhv6y3ls3ubitzfqnkrwxhopf5aygthi7d6rplyvk3noyd.onion/cgi-bin/omega/omega?P={search}"
response = session.get(url)
soup = BeautifulSoup(response.text, 'html.parser')
td_elements = soup.find_all('td')
for td in td_elements:
for small_tag in td.find_all('small'):
if 'matching' in small_tag.text:
small_tag.extract()
url_element = td.find('a')
if url_element:
url = url_element.get('href')
description = td.text.strip()
print(Fore.GREEN + "[URL]", f"{url}" + Style.RESET_ALL)
print(naranja + "[DESCRIPTION]", f"{description}" + Style.RESET_ALL)
print()
print()
print(violeta + " [?] Press enter to start a new search. ")
input()