-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmod.php
More file actions
122 lines (111 loc) · 4.14 KB
/
Copy pathmod.php
File metadata and controls
122 lines (111 loc) · 4.14 KB
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
<?php
session_start();
?>
<html>
<head>
<title>Crypt Api</title>
<link rel="icon" type="image/x-icon" href="classic.png">
<style>
body {
background-image:linear-gradient(black, #333333);
color: white;
font-weight: bold;
font-family: arial, helvetica, sans-serif;
text-align:center;
}
.title {
text-shadow:0 0 5px DarkGray, 0 0 5px gray;
}
.title2 {
color:LightBlue;
text-shadow:0 0 5px DarkBlue, 0 0 5px blue;
}
a {
color:LightGreen;
text-shadow:0 0 5px DarkGreen, 0 0 5px green;
}
</style>
</head>
<body>
<h1 class = "title2">Janny Login:</h1>
<hr>
<form method="POST" action="">
User <input type="text" name="user"></input><br/>
Pass <input type="password" name="pass"></input><br/>
<input type="submit" name="submit" value="Go"></input>
</form>
<hr>
<form method="POST" action="">
<input style = "display:none" type="text" name="log" id = "log2" value = "e" ></input>
Search <input type="text" name="term"></input>
<input type="submit" name="submit" value="Go"></input>
</form>
<div id = "result"></div>
<hr>
</body>
<script>
function getCookie(cname) {
let name = cname + "=";
let decodedCookie = decodeURIComponent(document.cookie);
let ca = decodedCookie.split(';');
for(let i = 0; i <ca.length; i++) {
let c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
document.getElementById("log2").value = c.substring(name.length, c.length);
}
}
return "";
}
getCookie("e");
</script>
</html>
<?php
$pass = "PASS HERE";
if(openssl_decrypt($_COOKIE["e"], "AES-128-CTR",
$pass, 0, "0192034627925103") == $_SERVER["REMOTE_ADDR"]){
$dcode = file_get_contents("thread.json");
$decode = json_decode($dcode,true);
$link = array_column(array_reverse($decode), "link");
$seed = array_column(array_reverse($decode), "pass");
// you can also replace the IV if you need.
setcookie('e', openssl_encrypt($_SERVER["REMOTE_ADDR"], "AES-128-CTR",
$pass, 0, "0192034627925103"), time() + (86400 * 30), "/");
for($i = 0; $i < count($link); $i++) {
echo "<b>password: ".$seed[$i]." : ".$link[$i]."</b><br>";
}
echo "<hr>";
}
if($_SERVER["REQUEST_METHOD"] && isset($_POST["user"]) && isset($_POST["pass"])) {
if($_POST["user"] == "janny" && $_POST["pass"] == "@J4nnyAcc0unt" || openssl_decrypt($_COOKIE["e"], "AES-128-CTR",
$pass, 0, "0192034627925103") == $_SERVER["REMOTE_ADDR"]){
$dcode = file_get_contents("thread.json");
$decode = json_decode($dcode,true);
$link = array_column(array_reverse($decode), "link");
$seed = array_column(array_reverse($decode), "pass");
// you can also replace the IV if you need.
setcookie('e', openssl_encrypt($_SERVER["REMOTE_ADDR"], "AES-128-CTR",
$pass, 0, "0192034627925103"), time() + (86400 * 30), "/");
for($i = 0; $i < count($link); $i++) {
echo "<b>password: ".$seed[$i]." : ".$link[$i]."</b><br>";
}
echo "<hr>";
}
}
if($_SERVER["REQUEST_METHOD"] && isset($_POST["log"]) && isset($_POST["term"])) {
if($_POST["log"] == openssl_decrypt($_COOKIE["e"], "AES-128-CTR",
$pass, 0, "0192034627925103")) {
$dcode = file_get_contents("thread.json");
$decode = json_decode($dcode,true);
$link = array_column(array_reverse($decode), "link");
$seed = array_column(array_reverse($decode), "pass");
for($i = 0; $i < count($link); $i++) {
if($link[$i] == $_POST["term"]){
echo "<script>let p = document.createElement('p'); p.innerText = 'The password for that thread is: ".$seed[$i]."'; document.getElementById('result').appendChild(p);</script>";
}
}
}
}
?>