forked from vxunderground/MalwareSourceCode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHackTool.Python.Doxing.a
335 lines (303 loc) · 11.2 KB
/
HackTool.Python.Doxing.a
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
import os
import requests
import sys
import subprocess
import re
import face_recognition
import json
done_checks = []
social_media = []
usernames = []
emails = []
twitter = []
instagram = []
steam = []
urls = []
urls_stalk = []
urls_done = []
name = ""
adresse = ""
compare = False
first_dl = False
def stalk(user):
if len(user) > 1:
global urls_stalk
pastebin_url = "https://pastebin.com/u/" + user
pastebin_str = "s Pastebin - Pastebin.com"
patreon_url = "https://www.patreon.com/" + user
patreon_str = 'created_at'
gutefrage_url = "https://www.gutefrage.net/nutzer/" + user
gutefrage_str = '<meta name="title" content="Profil von'
ebay_url = "https://www.ebay.de/usr/" + user
ebay_str = '<span>Angemeldet seit: </span>'
twitter_url = "https://twitter.com/" + user
twitter_str = '<link rel="canonical" href="https://twitter.com/' + user + '">'
facebook_url = 'https://facebook.com/' + user
facebook_str = ' hreflang="sv" href="https://sv-se.facebook.com/' + user
instagram_url = "https://www.instagram.com/" + user + "/"
instagram_str = '<link rel="alternate" href="https://www.instagram.com/' + user + '/?hl=en" hreflang="en" />'
steam_url = "https://steamcommunity.com/id/" + user
steam_str = 'https://steamcommunity-a.akamaihd.net/public/images/skin_1/arrowDn9x5.gif'
twitch_url = "https://www.twitch.tv/" + user
twitch_str = "content='twitch://stream/" + user
lachschon_url = "https://www.lachschon.de/community/user/" + user + "/"
lachschon_str = '<label>Rang</label>'
URLS = [pastebin_url, patreon_url, gutefrage_url, ebay_url, facebook_url, twitter_url, instagram_url, steam_url, twitch_url, lachschon_url]
STRS = [pastebin_str, patreon_str, gutefrage_str, ebay_str, facebook_str, twitter_str, instagram_str, steam_str, twitch_str, lachschon_str]
for i in range(0, len(URLS)):
html = getResponse(URLS[i])
if STRS[i].lower() in str(html).lower():
print("\t> " + URLS[i])
urls_stalk.append(URLS[i])
def get_twitter_img(user):
url = "https://twitter.com/" + user
html = subprocess.getoutput("phantomjs html.js " + url)
image = find_between(html, '<img class="ProfileAvatar-image " src="', '" alt="')
r = requests.get(image)
with open('Twitter.jpg', 'wb') as f:
f.write(r.content)
def get_instagram_img(user):
data = {
'username': user,
'submit': 'View DP'
}
response = requests.post('https://fullinstadp.com/index.php', data=data)
html = response.text
f = open("Out.html", "w")
f.write(html)
f.close
img_url = find_between(html, '<img class="loading img-rounded center-block img-responsive" src="', '" alt=""')
r = requests.get(img_url)
with open('Instagram.jpg', 'wb') as f:
f.write(r.content)
def check_mail(string):
EMAIL_REGEX = re.compile(r"[^@]+@[^@]+\.[^@]+")
if EMAIL_REGEX.match(string):
return True
else:
return False
def check_string_mail(string):
global emails
splitted = string.split(" ")
for word in splitted:
if check_mail(word):
emails.append(word)
def check_string_url(string):
global urls
for word in string.split(" "):
try:
url = re.search("(?P<url>https?://[^\s]+)", word).group("url")
if '//t.co/' in url:
last = url[-1:]
if last == ".":
url = url.rstrip('.')
r = requests.get(url)
url = r.url
urls.append(url)
except:
e = ""
def check_string_socialmedia(string):
global social_media
count = 0
next = 0
for word in string.split(" "):
next = count + 2
if 'facebook' in word.lower():
print(string.split(" ")[next])
count +=1
def youtube(url):
url = url + "/about"
html = subprocess.getoutput("phantomjs html.js " + url)
tmp_str = html.split('"}},"urlEndpoint":')
for url in tmp_str:
#print(url)
url = find_between(url, '{"url":"', '","target":')
print(html)
def grab_instagram(profile):
global done_checks
global urls
global instagram
global usernames
global compare
if not "instagram: " + profile in done_checks:
if not profile in usernames:
usernames.append(profile)
url = "https://www.instagram.com/" + profile + "/"
html = subprocess.getoutput("phantomjs html.js " + url)
if '"@type":"Person","name":"' in html:
display_name = find_between(html, '"@type":"Person","name":"', '","alternateName":"')
if not display_name in usernames:
usernames.append(display_name)
if not "instagram: " + display_name in done_checks:
print(display_name)
stalk(display_name)
instagram.append("Display Name: " + display_name)
description = find_between(html, '"user":{"biography":"', '","blocked_by_viewer')
follower = find_between(html, 'edge_followed_by":{"count":', '},"followed_by_viewer')
check_string_mail(description)
check_string_url(description)
instagram.append("Description: " + description)
instagram.append("Follower: " + follower)
#get_instagram_img(profile) // Buggy suche nach Alternative zu siehe Funktion
compare = True
if not "instagram: " + profile in done_checks:
done_checks.append("instagram: " + profile)
def grab_steam(url):
global done_checks
global urls
global usernames
if not "steam: " + profile in done_checks:
url = url + "/ajaxaliases/"
response = requests.get(url)
html = response.text
for item in html.split("newname"):
username = find_between(item, '":"', '","timechanged')
if not username in usernames:
usernames.append(username)
def grab_twitter(profile):
global done_checks
global urls
global adresse
global usernames
global twitter
global first_dl
if not "twitter: " + profile in done_checks:
url = "https://twitter.com/" + profile
urls.append(url)
html = subprocess.getoutput("phantomjs html.js " + url)
#variables
display_name = find_between(html, '<title>', ' (@')
if not profile in usernames:
usernames.append(profile)
if not display_name in usernames:
usernames.append(display_name)
if not "twitter: " + display_name in done_checks:
print(display_name)
stalk(display_name)
join_date = find_between(html, 'ProfileHeaderCard-joinDateText js-tooltip u-dir" dir="ltr" title="', '">Beigetreten')
description = ""
url = ""
location = ""
#if
if '<meta name="description"' in html:
description = find_between(html, '<meta name="description" content="', '">')
description = description.replace(""", "")
check_string_mail(description)
check_string_url(description)
if '<span class="ProfileHeaderCard-urlText u-dir"> <a class="u-textUserColor"' in html:
tmp = find_between(html, '<span class="ProfileHeaderCard-urlText u-dir">', '</a>')
url = find_between(tmp, '" title="', '">')
urls.append(url)
if 'location":"' in html:
location = find_between(html, '"location":"', '","url')
if len(location) > 0:
adresse = location
twitter.append("Display Name: " + display_name)
twitter.append("Join Date: " + join_date)
twitter.append("Description: " + description)
twitter.append("URL: " + url)
twitter.append("Location: " + location)
twitter.append(" ")
#if first_dl == False:
#get_twitter_img(profile)
#first_dl = True
if not "twitter: " + profile in done_checks:
done_checks.append("twitter: " + profile)
def handle():
try:
if sys.argv[1]:
social_media = sys.argv[1].lower()
if sys.argv[2]:
info_type = sys.argv[2].lower()
if sys.argv[3]:
infos = sys.argv[3].lower()
if info_type == "url":
if social_media == "youtube":
youtube(infos)
elif info_type == "profile":
if social_media == "twitter":
grab_twitter(infos)
elif info_type == "user":
if social_media == "stalk":
stalk(infos)
except Exception as e:
print(e)
def find_between( s, first, last ):
try:
start = s.index( first ) + len( first )
end = s.index( last, start )
return s[start:end]
except ValueError:
return ""
def getResponse(url):
response = requests.get(url)
#response.raise_for_status()
data = response.content
return data
handle()
for url in urls_stalk:
#print(url)
if 'twitter.com' in url:
checked = False
profile = url.split("/")[3]
for check in done_checks:
if check == "twitter: " + profile:
checked = True
if not checked:
grab_twitter(profile)
done_checks.append("twitter:" + profile)
if 'instagram.com' in url:
checked = False
profile = url.split("/")[3]
for check in done_checks:
if check == "instagram: " + profile:
checked = True
if not checked:
grab_instagram(profile)
#print("Download Profile Picture")
done_checks.append("instagram: " + profile)
#Steam Check direkt in der Stalk Funktion
if 'steamcommunity.com' in url:
checked = False
profile = url.split("/")[4]
for check in done_checks:
if check == "steam: " + profile:
checked = True
if not checked:
grab_steam(url)
done_checks.append("steam: " + profile)
print("------------------")
print("Usernames:")
print("------------------")
for user in usernames:
print(user)
stalk(user)
if len(urls) > 0:
print("------------------")
print("URLs:")
print("------------------")
for url in urls:
print(url)
if len(twitter) > 0:
print("------------------")
print("Twitter:")
print("------------------")
for item in twitter:
print(item)
if len(instagram) > 0:
print("------------------")
print("Instagram:")
print("------------------")
for item in instagram:
print(item)
if len(steam) > 0:
print("------------------")
print("Steam:")
print("------------------")
for item in steam:
print(item)
print("------------------")
print("Sites checked:")
print("------------------")
for check in done_checks:
print(check)