Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Lucksi
GitHub Repository: Lucksi/Mr.Holmes
Path: blob/master/GUI/Actions/People_Finder.php
1071 views
1
<?php
2
/*ORIGINAL CREATOR: Luca Garofalo (Lucksi)
3
AUTHOR: Luca Garofalo (Lucksi)
4
Copyright 2022-2023 Lucksi <[email protected]>
5
License: GNU General Public License v3.0*/
6
7
function Get_Message($Type,$Param){
8
require_once ("Language_Controller.php");
9
$Message = Message($Type,$Param);
10
return $Message;
11
}
12
13
function GetDetails($Folder,$Name,$User,$img,$Label){
14
$Complete = "../Reports/People/$Folder/Profile_pics/$Name/$User";
15
if(file_exists($Complete)){
16
$img2 = str_replace(".png",".jpg",$img);
17
$Image = "../Reports/People/$Folder/Profile_pics/Profile_pic_$img2";
18
$Reader2 = file_get_contents($Complete);
19
$Parser2 = json_decode($Reader2,true);
20
$Name_arr = array();
21
$Link_arr = array();
22
echo "<div class = 'Mini'>";
23
echo "<p id = Const >$Label</p>";
24
echo "<a href = $Image target = blank><img src = $Image id = 'Main'></a>";
25
foreach($Parser2["List"] as $Data){
26
$Name = $Data["Name"];
27
$Link = $Data["Link"];
28
array_push($Name_arr,$Name);
29
array_push($Link_arr,$Link);
30
}
31
foreach($Name_arr as $Data => $value){
32
$link2 = $Data["Link"];
33
echo "<a href = '{$Link_arr[$Data]}' target = 'blank'>"."<img src = '../Icon/Entities/Site_Icon/$img' abbr title = '{$Name_arr[$Data]}'></a>";
34
}
35
}
36
else{
37
38
}
39
echo "</div>";
40
}
41
42
function GetHypotesi($File_name){
43
$Complete_name = "../Reports/People/{$File_name}/Recap.txt";
44
$Complete_name2 = "../Reports/People/{$File_name}/Recap.mh";
45
if(file_exists($Complete_name)){
46
echo "\n\t\t<div class = 'Data5'>";
47
$data = fopen($Complete_name,"r")or die("Server-Error");
48
echo "\n\t\t\t<p id = Const>HYPOTESYS:</p>\n";
49
while (!feof($data)){
50
$content = fgets($data);
51
echo "\t\t\t<p>".$content."</p>";
52
}
53
fclose($data);
54
echo "</p>";
55
echo "\n\t\t</div>";
56
}
57
else if(file_exists($Complete_name2)){
58
require_once("Decode.php");
59
echo "\n\t\t<div class = 'Data5'>";
60
$data = fopen($Complete_name2,"r")or die("Server-Error");
61
echo "\n\t\t\t<p id = Const>HYPOTESYS:</p>\n";
62
while (!feof($data)){
63
$content = fgets($data);
64
$string = Decode($content);
65
echo "\t\t\t<pre><p>".$string."</p></pre>";
66
}
67
fclose($data);
68
echo "</p>";
69
echo "\n\t\t</div>";
70
}
71
else{
72
echo "\n\t\t\t<p id = 'error' align = 'center'>NOT FIND ANY DORK FOR THIS USER</p>";
73
}
74
}
75
76
function Get_Dorks($Complete_name){
77
if(file_exists($Complete_name)){
78
echo "\n\t\t<div class = 'Data2'>";
79
$data = fopen($Complete_name,"r")or die("Server-Error");
80
echo "\n\t\t\t<p id = Const>DORKS-LIST:</p>\n";
81
while (!feof($data)){
82
$content = fgets($data);
83
echo "\t\t\t<p>".$content."</p>";
84
}
85
fclose($data);
86
echo "</p>";
87
echo "\n\t\t</div>";
88
}
89
else{
90
echo "\n\t\t\t<p id = 'error' align = 'center'>NOT FIND ANY DORK FOR THIS USER</p>";
91
}
92
}
93
94
function Get_List($File_name,$Complete_name,$Name,$ImageName){
95
$Json_file = str_replace(".txt",".json",$Complete_name);
96
$Json_file2 = str_replace("{$File_name}.json",$Name,$Json_file);
97
if(file_exists($Json_file2)){
98
echo "<div class = 'Wrapper2'>";
99
echo "\n\t\t<div class = 'Data_img3'>";
100
echo "<p id = 'Const2'>RESULTS:</p>";
101
$Reader2 = file_get_contents($Json_file2);
102
$Parser2 = json_decode($Reader2,true);
103
$Name_arr = array();
104
foreach($Parser2["List"] as $Data){
105
$user = $Data["username"];
106
$link = $Data["site"];
107
echo "<a href = '$link' target = blank><img src = '../Icon/Entities/Site_Icon/{$ImageName}' abbr title=$user></a>";
108
}
109
/*foreach($Parser2["List"] as $Data){
110
$link = $Data["site"];
111
array_push($Name_arr,$Data["site"]);
112
}
113
foreach($Name_arr as $Data => $value){
114
$link2 = $Data["name"];
115
echo "<a href = '{$Name_arr[$Data]}' target = 'blank'>"."<img src = '../Icon/Entities/Site_Icon/{$ImageName}'></a>";
116
}*/
117
echo "</div>";
118
}
119
else{
120
121
}
122
}
123
124
function Get_Posts($File_name,$Folder_name,$Argument_Name){
125
$Dir_Name = "../Reports/People/{$File_name}/Profile_pics/{$Folder_name}/";
126
if(file_exists($Dir_Name)){
127
echo "<center>";
128
echo "<div class = 'Wrapper2'>";
129
echo "\n\t\t<div class = 'Data_img2'>";
130
echo "<p id = 'Const2'>$Argument_Name:</p>";
131
$image = glob($Dir_Name."*.jpg");
132
$details = glob($Dir_Name."*.txt");
133
$geo = glob($Dir_Name."*.json");
134
$fold = glob("$Dir_Name*" ,GLOB_ONLYDIR);
135
$i = 0;
136
$g = 0;
137
$n = 1;
138
$n1 = 1;
139
$j = 0;
140
141
$profile_pic = str_replace("_Posts","",$Folder_name);
142
if(getimagesize("../Reports/People/{$File_name}/Profile_pics/Profile_pic_$profile_pic.jpg") == false){
143
144
echo "<a href = '../Icon/Entities/Image.png' target = 'blank'><img src = '../Icon/Entities/Image.png' id = 'Main_pics' abbr title = '$profile_pic.jpg'></a>";
145
146
}
147
else{
148
echo "<a href = '../Reports/People/{$File_name}/Profile_pics/Profile_pic_$profile_pic.jpg' target = 'blank'><img src = '../Reports/People/{$File_name}/Profile_pics/Profile_pic_{$profile_pic}.jpg' id = 'Main_pics' abbr title = '$profile_pic'></a>";
149
}
150
151
if($Folder_name == "TikTok_Posts"){
152
foreach(array_reverse($fold) as $Content => $value){
153
$b = 0;
154
$data_file = glob("$value/*"."txt");
155
$cut_img = str_replace("$value/","",$data_file[$b]);
156
$img = str_replace(".txt",".jpg",$cut_img);
157
$video = str_replace(".txt",".mp4",$cut_img);
158
$poster = "$value/$img";
159
$watch = "../Reports/People/{$File_name}/Profile_pics/$Folder_name/$video";
160
if (getimagesize($poster)){
161
echo "<a href = '$watch' target = 'blank'><img src = '{$poster}'></a>";
162
}
163
else{
164
165
}
166
}
167
echo "</div>\n";
168
echo "<div class = 'Data3'>";
169
echo "<p id = 'Const2'>{$Argument_Name} DATAS:</p>";
170
foreach(array_reverse($fold) as $Content => $value){
171
$b = 0;
172
$data_file = glob("$value/*"."txt");
173
$cut_img = str_replace("$value/","",$data_file[$b]);
174
$img = str_replace(".txt",".jpg",$cut_img);
175
$video = str_replace(".txt",".mp4",$cut_img);
176
$poster = "$value/$img";
177
$watch = "../Reports/People/{$File_name}/Profile_pics/$Folder_name/$video";
178
if (getimagesize($poster)){
179
echo "<a href = '$watch' target = 'blank'><img src = '{$poster}'></a>";
180
$opener = fopen($data_file[$j],"r") or die("$php_errormsg");
181
while(!feof($opener)){
182
$reader = fgets($opener);
183
echo "<p>$reader</p>";
184
}
185
}
186
else{
187
188
}
189
echo "<hr>";
190
$n1 = $n1 +1 ;
191
}
192
echo "</div>";
193
}
194
else {
195
foreach(array_reverse($image) as $Content1){
196
$i = $i +1;
197
$img1 = $Content1;
198
if (file_exists($img1)){
199
if(getimagesize($img1) == false){
200
echo "<a href = '../Icon/Entities/Image.png' target = 'blank'><img src = '../Icon/Entities/Image.png' id = 'pics' abbr title = 'Post N°$i'></a>";
201
}
202
else{
203
echo "\t\t\t<a href = '{$img1}' target = 'blank'>"."<img src = '{$img1}' id = 'pics' abbr title = 'Post N°$i'></a>";
204
}
205
}
206
else{
207
echo "none";
208
}
209
}
210
echo "</div>";
211
echo "<div class = 'Data3'>";
212
echo "<p id = 'Const2'>{$Argument_Name} DATAS:</p>";
213
$i = 0;
214
foreach(array_reverse($fold) as $Content => $value){
215
$b = 0;
216
$i = $i+1;
217
$data_file = glob("$value/*"."txt");
218
if ($Folder_name == "Instagram_Posts"|| $Folder_name == "Twitter_Posts"){
219
$cut_img = str_replace("$value/","",$data_file[$b]);
220
$img = str_replace(".txt",".jpg",$cut_img);
221
$img = str_replace("_details","",$img);
222
$img = str_replace("Post","Pic",$img);
223
$Content = "../Reports/People/{$File_name}/Profile_pics/$Folder_name/$img";
224
if(getimagesize($Content) == false){
225
echo "<a href = '../Icon/Entities/Image.png' target = 'blank'><img src = '../Icon/Entities/Image.png' id = 'pics' abbr title = '$abbr_2' style = 'border-radius:300px;border-height:10px;'></a>";
226
}
227
else{
228
echo "<a href = '{$Content}' target = blank><img src = '{$Content}' id = 'pics' abbr title = 'Post N°$i'></a>";
229
}
230
}
231
$opener = fopen($data_file[$j],"r") or die("$php_errormsg");
232
while(!feof($opener)){
233
$reader = fgets($opener);
234
echo "<p>$reader</p>";
235
}
236
echo "<hr>";
237
$n1 = $n1 +1 ;
238
}
239
echo "</div>";
240
if ($Folder_name == "Instagram_Posts"){
241
echo "<div class = 'Data4'>";
242
echo "<p id = 'Const2'>{$Argument_Name} GEOLOCATION:</p>";
243
foreach(array_reverse($fold) as $Content => $value){
244
$b = 0;
245
$data_file = glob("$value/*"."json");
246
$format_name = str_replace("$Dir_Name","",$data_file);
247
$complete_name = str_replace(".json","",$format_name);
248
$cut_img = str_replace("$value/","",$data_file[$b]);
249
if(file_exists($data_file[$b])){
250
$img = str_replace(".json",".jpg",$cut_img);
251
$id = str_replace(".jpg","",$img);
252
$Content = "../Reports/People/{$File_name}/Profile_pics/$Folder_name/$img";
253
if(getimagesize($Content) == false){
254
echo "<a href = '../Icon/Entities/Image.png' target = 'blank'><img src = '../Icon/Entities/Image.png' id = 'pics' abbr title = '$abbr_2' style = 'border-radius:50px;'></a>";
255
}
256
else{
257
echo "<a href = '{$Content}' target = blank><img src = '{$Content}' id = 'pics' abbr title = 'Post N°$n1'></a>";
258
}
259
$reader = file_get_contents($data_file[$b]);
260
$parser = json_decode($reader,true);
261
$Latitude = $parser["Geolocation"]["Latitude"];
262
$Longitude = $parser["Geolocation"]["Longitude"];
263
echo "
264
<div class = 'map' id='map{$g}'></div>
265
<script>
266
var map = L.map('map{$g}').setView([$Latitude,$Longitude], 14);
267
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
268
attribution: '&copy; <a href= https://www.openstreetmap.org/copyright >OpenStreetMap</a> contributors'
269
}).addTo(map);
270
271
L.marker([$Latitude,$Longitude]).addTo(map)
272
.bindPopup('Post id: {$id} is approximatley based in this Area.')
273
.openPopup();
274
</script>";
275
echo "<hr>";
276
$g = $g +1;
277
}
278
else{
279
280
}
281
$n = $n + 1;
282
}
283
}
284
}
285
}
286
else{
287
}
288
echo"</div>";
289
echo "</center>";
290
}
291
292
function Checker() {
293
$File_name = $_POST["Searcher"];
294
$File_name = str_replace(" ","_",$File_name);
295
$PoPups = "../Language/Errors.json";
296
$reader = file_get_contents($PoPups);
297
$decoder = json_decode($reader,true);
298
if ($File_name == ""){
299
$Message = Get_Message("NotEntered","Person");
300
echo "
301
<script>
302
alert('$Message');
303
</script>";
304
}
305
else {
306
$Complete_name = "../Reports/People/{$File_name}/{$File_name}.txt";
307
$Complete_name2 = "../Reports/People/{$File_name}/{$File_name}.mh";
308
if(file_exists($Complete_name)){
309
$Message = Get_Message("Positives","Person");
310
echo "
311
<script>
312
alert('$Message');
313
</script>";
314
echo "\n\t<p id = 'Const'>PERSON DATA</p>";
315
echo "\n\t<div class = 'Wrapper'>";
316
echo "\n\t\t<div class = 'Data'>";
317
$data = fopen($Complete_name,"r")or die("Server-Error");
318
echo "\n\t\t\t<p id = Const>REPORT:</p>\n";
319
while (!feof($data)){
320
$content = fgets($data);
321
echo "\t\t\t<p>".$content."</p>";
322
}
323
fclose($data);
324
echo "</p>";
325
echo "\n\t\t</div>";
326
echo "\n\t\t<div class = 'Data_img'>";
327
$Dir_Name = "../Reports/People/{$File_name}/Profile_pics/";
328
if(file_exists($Dir_Name)){
329
$image = glob($Dir_Name."*.jpg");
330
echo "\t\t\t<p id = 'Const2'>PROFILE-PICS:$File_name</p>";
331
foreach($image as $Content) {
332
$abbr_1 = str_replace("../Reports/People/{$File_name}/Profile_pics/Profile_pic_","",$Content);
333
$abbr_2 = str_replace(".jpg","",$abbr_1);
334
if(getimagesize($Content) == false){
335
echo "<a href = '../Icon/Entities/Image.png' target = 'blank'><img src = '../Icon/Entities/Image.png' id = 'pics' abbr title = '$abbr_2'></a>";
336
echo "<br>";
337
}
338
else{
339
echo "\t\t\t<a href = '{$Content}'target = 'blank'><img src = '{$Content}' id = 'pics' abbr title = '$abbr_2'></a>";
340
echo "<br>";
341
}
342
}
343
}
344
else{
345
echo "\t\t\t<p id = 'Const2'>PROFILE-PICS:$File_name</p>";
346
echo "\n\t\t\t<p id = 'error'>NOT FIND ANY PROFILE PIC FOR THIS USER</p>";
347
}
348
echo "\n\t\t</div>";
349
echo "</div>";
350
GetHypotesi($File_name);
351
$Folder_name = "Instagram_Posts";
352
$Argument_Name = "INSTAGRAM-POSTS";
353
echo "<center>";
354
Get_List($File_name,$Complete_name,"Insta_Link.json","Instagram.png");
355
echo "</center>";
356
Get_Posts($File_name,$Folder_name,$Argument_Name);
357
echo"</div>";
358
$Folder_name = "Twitter_Posts";
359
$Argument_Name = "TWITTER-POSTS";
360
echo "<center>";
361
Get_List($File_name,$Complete_name,"Twitter_Link.json","Twitter.png");
362
echo "</center>";
363
Get_Posts($File_name,$Folder_name,$Argument_Name);
364
echo"</div>";
365
echo"</div>";
366
$Folder_name = "TikTok_Posts";
367
$Argument_Name = "TIKTOK-POSTS";
368
echo "<center>";
369
Get_List($File_name,$Complete_name,"TikTok_Link.json","TikTok.png");
370
echo "</center>";
371
Get_Posts($File_name,$Folder_name,$Argument_Name);
372
echo"</div>";
373
echo "<center>";
374
Get_List($File_name,$Complete_name,"Github_Link.json","GitHub.png");
375
echo "</center>";
376
echo "<center>";
377
echo "<hr>";
378
echo "<p id = 'Const2'>TAGGED USERS:</p>";
379
echo "<div class = 'Wrapper'>";
380
GetDetails($File_name,"Instagram_Posts","Users.json","Instagram.png","INSTAGRAM");
381
GetDetails($File_name,"TikTok_Posts","Users.json","TikTok.png","TIK-TOK");
382
GetDetails($File_name,"Twitter_Posts","Users.json","Twitter.png","TWITTER");
383
echo "<hr>";
384
echo "<p id = 'Const2'>HASHTAGS:</p>";
385
GetDetails($File_name,"Instagram_Posts","Hashtags.json","Instagram.png","INSTAGRAM");
386
GetDetails($File_name,"TikTok_Posts","Hashtags.json","TikTok.png","TIK-TOK");
387
GetDetails($File_name,"Twitter_Posts","Hashtags.json","Twitter.png","TWITTER");
388
echo "<hr>";
389
echo "<p id = 'Const2'>EXTERNAL LINKS:</p>";
390
GetDetails($File_name,"Instagram_Posts","Links.json","Instagram.png","INSTAGRAM");
391
GetDetails($File_name,"TikTok_Posts","Links.json","TikTok.png","TIK-TOK");
392
GetDetails($File_name,"Twitter_Posts","Links.json","Twitter.png","TWITTER");
393
echo "<hr>";
394
echo "</div>";
395
$File_name = str_replace("_"," ",$File_name);
396
echo "<p id = 'Const2'>DORKS:</p>";
397
$Complete_name = "../Reports/People/Dorks/{$File_name}_Dorks.txt";
398
Get_Dorks($Complete_name);
399
}
400
else if(file_exists($Complete_name2)){
401
require_once("Decode.php");
402
$Message = Get_Message("Positives","Person");
403
echo "
404
<script>
405
alert('$Message');
406
</script>";
407
echo "\n\t<p id = 'Const'>USERNAME DATA</p>";
408
echo "\n\t<div class = 'Wrapper'>";
409
echo "\n\t\t<div class = 'Data'>";
410
$data = fopen($Complete_name2,"r")or die("Server-Error");
411
echo "\n\t\t\t<p id = Const>REPORT:</p>\n";
412
$content= fread($data,filesize($Complete_name2));
413
$string = Decode($content);
414
fclose($data);
415
echo "<pre><p>.$string</pre>";
416
echo "</p>";
417
echo "\n\t\t</div>";
418
echo "\n\t\t<div class = 'Data_img'>";
419
$Dir_Name = "../Reports/People/{$File_name}/Profile_pics/";
420
if(file_exists($Dir_Name)){
421
$image = glob($Dir_Name."*.jpg");
422
echo "\t\t\t<p id = 'Const2'>PROFILE-PICS:$File_name</p>";
423
foreach($image as $Content) {
424
$abbr_1 = str_replace("../Reports/People/{$File_name}/Profile_pics/Profile_pic_","",$Content);
425
$abbr_2 = str_replace(".jpg","",$abbr_1);
426
if(getimagesize($Content) == false){
427
echo "<a href = '../Icon/Entities/Image.png' target = 'blank'><img src = '../Icon/Entities/Image.png' id = 'pics' abbr title = '$abbr_2'></a>";
428
echo "<br>";
429
}
430
else{
431
echo "\t\t\t<a href = '{$Content}'target = 'blank'><img src = '{$Content}' id = 'pics' abbr title = '$abbr_2'></a>";
432
echo "<br>";
433
}
434
}
435
}
436
else{
437
echo "\t\t\t<p id = 'Const2'>PROFILE-PICS:$File_name</p>";
438
echo "\n\t\t\t<p id = 'error'>NOT FIND ANY PROFILE PIC FOR THIS USER</p>";
439
}
440
echo "\n\t\t</div>";
441
echo "</div>";
442
GetHypotesi($File_name);
443
$Folder_name = "Instagram_Posts";
444
$Argument_Name = "INSTAGRAM-POSTS";
445
echo "<center>";
446
Get_List($File_name,$Complete_name,"Insta_Link.json","Instagram.png");
447
echo "</center>";
448
Get_Posts($File_name,$Folder_name,$Argument_Name);
449
echo"</div>";
450
$Folder_name = "Twitter_Posts";
451
$Argument_Name = "TWITTER-POSTS";
452
echo "<center>";
453
Get_List($File_name,$Complete_name,"Twitter_Link.json","Twitter.png");
454
echo "</center>";
455
Get_Posts($File_name,$Folder_name,$Argument_Name);
456
echo"</div>";
457
echo"</div>";
458
$Folder_name = "TikTok_Posts";
459
$Argument_Name = "TIKTOK-POSTS";
460
echo "<center>";
461
Get_List($File_name,$Complete_name,"TikTok_Link.json","TikTok.png");
462
echo "</center>";
463
Get_Posts($File_name,$Folder_name,$Argument_Name);
464
echo"</div>";
465
echo "<center>";
466
echo "<hr>";
467
echo "<p id = 'Const2'>TAGGED USERS:</p>";
468
echo "<div class = 'Wrapper'>";
469
GetDetails($File_name,"Instagram_Posts","Users.json","Instagram.png","INSTAGRAM");
470
GetDetails($File_name,"TikTok_Posts","Users.json","TikTok.png","TIK-TOK");
471
GetDetails($File_name,"Twitter_Posts","Users.json","Twitter.png","TWITTER");
472
echo "<hr>";
473
echo "<p id = 'Const2'>HASHTAGS:</p>";
474
GetDetails($File_name,"Instagram_Posts","Hashtags.json","Instagram.png","INSTAGRAM");
475
GetDetails($File_name,"TikTok_Posts","Hashtags.json","TikTok.png","TIK-TOK");
476
GetDetails($File_name,"Twitter_Posts","Hashtags.json","Twitter.png","TWITTER");
477
echo "<hr>";
478
echo "<p id = 'Const2'>EXTERNAL LINKS:</p>";
479
GetDetails($File_name,"Instagram_Posts","Links.json","Instagram.png","INSTAGRAM");
480
GetDetails($File_name,"TikTok_Posts","Links.json","TikTok.png","TIK-TOK");
481
GetDetails($File_name,"Twitter_Posts","Links.json","Twitter.png","TWITTER");
482
echo "<hr>";
483
echo "</div>";
484
$File_name = str_replace("_"," ",$File_name);
485
$Complete_name = "../Reports/People/Dorks/{$File_name}_Dorks.txt";
486
echo "<p id = 'Const2'>DORKS:</p>";
487
Get_Dorks($Complete_name);
488
}
489
else {
490
$Message = Get_Message("Errors","Person");
491
echo "
492
<script>
493
alert('$Message');
494
</script>";
495
}
496
}
497
}
498
499
if(isset($_POST["Button"])){
500
Checker();
501
}
502
?>
503
504