-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.php
110 lines (108 loc) · 4.89 KB
/
index.php
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
<!--ORIGINAL CREATOR: Luca Garofalo (Lucksi)
AUTHOR: Luca Garofalo (Lucksi)
Copyright (C) 2023 Lucksi <lukege287@gmail.com>
License: GNU General Public License v3.0-->
<!DOCTYPE HTML>
<html>
<head>
<?php
function get_res(){
if (isset($_POST["WEB"])){
$parameter = $_POST["input"];
if($parameter == ""){
echo"<script>alert('Insert a parameter')</script>";
echo "<span id = 'NotFound'>Insert a parameter</span>";
}
$filename = "output/{$parameter}/{$parameter}.txt";
$filename2 = "output/{$parameter}/{$parameter}.Dk";
}
else if(isset($_POST["IMAGE"])){
$parameter = $_POST["input"];
if($parameter == ""){
echo"<script>alert('Insert a parameter')</script>";
echo "<span id = 'NotFound'>Insert a parameter</span>";
}
$filename = "output/{$parameter}/{$parameter}_image.txt";
$filename2 = "output/{$parameter}/{$parameter}_image.Dk";
}
if($parameter != ""){
if(file_exists($filename)){
$f = fopen($filename,"r")or die("\n\nError");
echo "<h3>{$parameter}-Results:</h3>";
echo "<div class = 'results'>";
while (!feof($f)){
$content = fgets($f);
echo "\t\t\t<p>".$content."</p>";
}
echo "</div>";
}
else if(file_exists($filename2)){
$f = fopen($filename2,"r")or die("\n\nError");
echo "<h3>{$parameter}-Results:</h3>";
echo "<div class = 'results'>";
while (!feof($f)){
$content = fgets($f);
$converted = base64_decode($content);
echo "\t\t\t<pre><p>".$converted."</pre>";
}
echo "</div>";
}
else{
echo "<span id = 'NotFound'>{$parameter} Not Found</span>";
}
}
}
?>
<script>
function Image_Search(){
document.getElementById("image").style.display="block";
document.getElementById("Web").style.display="none";
document.getElementById("Img").style.backgroundColor="Green";
document.getElementById("Img").style.borderRadius="20px";
document.getElementById("Img").style.width="60px";
document.getElementById("web").style.width="none";
document.getElementById("web").style.backgroundColor="transparent";
//document.getElementsByClassName("choice_bar")[0].style.marginLeft="-25px";
}
function Web_Search(){
document.getElementById("Web").style.display="block";
document.getElementById("image").style.display="none";
document.getElementById("web").style.backgroundColor="Green";
document.getElementById("web").style.borderRadius="20px";
document.getElementById("web").style.width="50px";
document.getElementById("Img").style.width="none";
document.getElementById("Img").style.backgroundColor="transparent";
}
</script>
<title>Darkus</title>
<link rel = "stylesheet" href ="Css/Style.css">
</head>
<body onload = "Web_Search()">
<center>
<h1>DARKUS</h1>
<p>A Onion Link Searcher</p>
<div class = "choice_bar">
<p onclick="Image_Search()" id = "Img">Images</p>
<p onclick="Web_Search()" id = "web">Web</p>
</div>
<div class = "searchbar">
<div id ="Web">
<form action = "" method = "POST">
<input type = "text" placeholder = "Insert the parameter to search in the DB" name = "input" id = "search">
<button type = "submit" name = "WEB">Search</button>
</form>
</div>
<div id ="image">
<form action = "" method = "POST">
<input type = "text" placeholder = "Insert the image parameter to search in the DB" name = "input" id = "search">
<button type = "submit" name = "IMAGE">Search</button>
</form>
</div>
<?php
get_res();
?>
</div>
</center>
</div>
</body>
</html>