-
Notifications
You must be signed in to change notification settings - Fork 0
/
linkbypasser.py
168 lines (159 loc) · 6.88 KB
/
linkbypasser.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
import requests
import shodan
import os
import platform
from datetime import date
from colorama import Fore, Back, Style
import json
import time
import socket
import re
import io
import tarfile
V_API = "virus Total Api Key"
S_API = "Shodan API key"
banner = """
__ __ _______ _______ ______ ______ ________
/ \ / |/ \ / \ / \ / \ / |
$$ \ /$$ |$$$$$$$ | $$$$$$$ |/$$$$$$ |/$$$$$$ |$$$$$$$$/
$$$ \ /$$$ |$$ |__$$ | $$ |__$$ |$$ | $$ |$$ | $$ | $$ |
$$$$ /$$$$ |$$ $$< $$ $$< $$ | $$ |$$ | $$ | $$ |
$$ $$ $$/$$ |$$$$$$$ | $$$$$$$ |$$ | $$ |$$ | $$ | $$ |
$$ |$$$/ $$ |$$ | $$ | __ $$ | $$ |$$ \__$$ |$$ \__$$ | $$ |
$$ | $/ $$ |$$ | $$ |/ |$$ | $$ |$$ $$/ $$ $$/ $$ |
$$/ $$/ $$/ $$/ $$/ $$/ $$/ $$$$$$/ $$$$$$/ $$/
"""
def windowsScan(url):
api = shodan.Shodan(S_API)
print("")
print(Fore.RED + "Url Will Be Worked With : " + Style.RESET_ALL + url + Style.RESET_ALL)
url_fix = url.replace("https://", "")
url_fix2 = url_fix.replace("http://", "")
url_fix_end = url_fix2.replace("/", "")
try :
search = socket.gethostbyname(url_fix_end)
except:
print("")
print("Error [Socket] No Internet Connection Or FireWall Blocked The Request . ")
time.sleep(1)
os.system("cls")
print(Fore.GREEN + "Shodan Search Started . . . " + Style.RESET_ALL )
results = api.search(search)
print("")
print( Fore.RED +'Results found: {}'.format(results['total']) + Style.RESET_ALL )
for result in results['matches']:
print(Fore.RED + 'IP: {}'.format(result['ip_str']))
print(result['data'])
print('')
print(Fore.GREEN + "Finshed . . . " + Style.RESET_ALL )
print("")
input("Press Enter To Complete..")
os.system("cls")
print(f"{Fore.RED} Starting Virus Total ... {Style.RESET_ALL}")
time.sleep(1)
os.system("cls")
url = 'https://www.virustotal.com/vtapi/v2/url/scan'
params = {'apikey': V_API, 'url':url}
response = requests.post(url, data=params)
print (json.dumps(response.json(), indent=4, sort_keys=True))
print("")
input("Press Enter To Complete..")
os.system("cls")
print(Fore.GREEN + "getting info ...." + Style.RESET_ALL)
url_V = 'https://www.virustotal.com/vtapi/v2/domain/report'
params = {'apikey':V_API,'domain':url_fix_end}
response = requests.get(url_V, params=params)
print (json.dumps(response.json(), indent=4, sort_keys=True))
#rint(response.json())
#com = input(Fore.RED + "Do You Want To Scan it With VirusTotal ? Y/N : "+ Style.RESET_ALL )
def LinuxScan(url):
api = shodan.Shodan(S_API)
print("")
print(Fore.RED + "Url Will Be Worked With : " + Style.RESET_ALL + url + Style.RESET_ALL)
url_fix = url.replace("https://", "")
url_fix2 = url_fix.replace("http://", "")
url_fix_end = url_fix2.replace("/", "")
try :
search = socket.gethostbyname(url_fix_end)
except:
print("")
print("Error [Socket] No Internet Connection Or FireWall Blocked The Request . ")
time.sleep(1)
os.system("clear")
print(Fore.GREEN + "Shodan Search Started . . . " + Style.RESET_ALL )
results = api.search(search)
print("")
print( Fore.RED +'Results found: {}'.format(results['total']) + Style.RESET_ALL )
for result in results['matches']:
print(Fore.RED + 'IP: {}'.format(result['ip_str']))
print(result['data'])
print('')
print(Fore.GREEN + "Finshed . . . " + Style.RESET_ALL )
print("")
input("Press Enter To Complete..")
os.system("clear")
print(f"{Fore.RED} Starting Virus Total ... {Style.RESET_ALL}")
time.sleep(1)
os.system("clear")
url = 'https://www.virustotal.com/vtapi/v2/url/scan'
params = {'apikey': V_API, 'url':url}
response = requests.post(url, data=params)
print (json.dumps(response.json(), indent=4, sort_keys=True))
print("")
input("Press Enter To Complete..")
os.system("clear")
print(Fore.GREEN + "getting info ...." + Style.RESET_ALL)
url_V = 'https://www.virustotal.com/vtapi/v2/domain/report'
params = {'apikey':V_API,'domain':url_fix_end}
response = requests.get(url_V, params=params)
print (json.dumps(response.json(), indent=4, sort_keys=True))
#rint(response.json())
#com = input(Fore.RED + "Do You Want To Scan it With VirusTotal ? Y/N : "+ Style.RESET_ALL )
def Linux():
print("")
url = input(f" {Fore.RED}Enter Url Here : {Style.RESET_ALL} ")
r = requests.get(url)
print(Fore.GREEN + "[*] Url Bypassed successfully : " + Style.RESET_ALL + Fore.WHITE + r.url + Style.RESET_ALL)
url_Linux = r.url
LinuxScan(url_Linux)
def windows():
print("")
url = input(f" {Fore.RED}Enter Url Here : {Style.RESET_ALL} ")
r = requests.get(url)
print(Fore.GREEN + "[*] Url Bypassed successfully : " + Style.RESET_ALL + Fore.WHITE + r.url + Style.RESET_ALL)
Url_Windows = r.url
windowsScan(Url_Windows)
def startt():
system = os.name
if (system == "nt"):
os.system("cls")
today = date.today()
date_time = today.strftime("%B %d, %Y")
print(f"{Fore.GREEN}Started On {date_time} {Style.RESET_ALL}")
time.sleep(1)
os.system("cls")
time.sleep(0.50)
info = f"{Fore.RED} System : {platform.system()} {Style.RESET_ALL} {Fore.GREEN} \n Realese : {platform.release()} {Style.RESET_ALL} {Fore.RED} \n Machine : {platform.machine()} {Style.RESET_ALL} {Fore.GREEN} \n Processor : {platform.processor()} {Style.RESET_ALL}"
print(Fore.RED + " [*] Windows System Detected " + Style.RESET_ALL)
time.sleep(0.70)
print(Fore.GREEN + " [*] Starting Windows Function" + Style.RESET_ALL)
time.sleep(0.70)
os.system("cls")
print(f"{Fore.RED} {banner} {Style.RESET_ALL}")
print(Fore.WHITE + " \n [*] Started On : " + Style.RESET_ALL)
print(info)
windows()
else :
today = date.today()
date_time = today.strftime("%B %d, %Y")
os.system("clear")
print(f"{Fore.GREEN}Started On {date_time} {Style.RESET_ALL}")
time.sleep(1)
info = f"{Fore.RED} System : {platform.system()} {Style.RESET_ALL} {Fore.GREEN} \n Realese : {platform.release()} {Style.RESET_ALL} {Fore.RED} \n Machine : {platform.machine()} {Style.RESET_ALL} {Fore.GREEN} \n Processor : {platform.processor()} {Style.RESET_ALL}"
print(Fore.RED + " [*] Linux System Detected " + Style.RESET_ALL)
time.sleep(0.70)
print(Fore.GREEN + " [*] Starting Linux Function" + Style.RESET_ALL)
time.sleep(0.50)
print(Fore.WHITE + " \n [*] Started On : " + Style.RESET_ALL)
print(info)
startt()