Add files via upload
This commit is contained in:
parent
cc6919fb19
commit
6eb75cf8c7
46
CommandExecution/CommandExec-3.php
Normal file
46
CommandExecution/CommandExec-3.php
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="shortcut icon" href="../Resources/hmbct.png" />
|
||||||
|
<title>CommandExec-3</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div style="background-color:#afafaf;padding:15px;border-radius:20px 20px 0px 0px">
|
||||||
|
<button type="button" name="homeButton" onclick="location.href='../homepage.html';">Home Page</button>
|
||||||
|
<button type="button" name="mainButton" onclick="location.href='commandexec.html';">Main Page</button>
|
||||||
|
</div>
|
||||||
|
<div style="background-color:#c9c9c9;padding:20px;">
|
||||||
|
<h1 align="center"></h1>
|
||||||
|
<form align="center" action="CommandExec-3.php" method="$_GET">
|
||||||
|
<input type="text" name="typeBox" value=""><br>
|
||||||
|
<input type="submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div style="background-color:#ecf2d0;padding:20px;border-radius:0px 0px 20px 20px" align="center">
|
||||||
|
<?php
|
||||||
|
if(isset($_GET["typeBox"])){
|
||||||
|
$target =$_GET["typeBox"];
|
||||||
|
$substitutions = array(
|
||||||
|
'&&'=>'',
|
||||||
|
'& ' => '',
|
||||||
|
'&& ' => '',
|
||||||
|
';' => '',
|
||||||
|
'|' => '',
|
||||||
|
'-' => '',
|
||||||
|
'$' => '',
|
||||||
|
'(' => '',
|
||||||
|
')' => '',
|
||||||
|
'`' => '',
|
||||||
|
'||' => '',
|
||||||
|
'/' => '',
|
||||||
|
'\\' => '',
|
||||||
|
);
|
||||||
|
$target = str_replace(array_keys($substitutions),$substitutions,$target);
|
||||||
|
echo shell_exec($target);
|
||||||
|
if($_GET["typeBox"] == "flag")
|
||||||
|
echo "You did again! Impressive.";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user