if (!empty($_REQUEST['remote_url'])) {
    echo "the product done finished.";
    outputForm();
    exit;
}
if (!empty($urls_arr)) {
    $urls_arr = array_reverse($urls_arr);
    $content = implode("\n", $urls_arr);
    file_put_contents($cache_url, $content);
    updatePage();
}
echo "success.<br>";
if ($new_products_id) {
    outputForm($new_products_id);
} else {
    outputForm();
}
echo "Finish.";
exit;
function updatePage()
{
    global $detail_url, $remote_url;
    echo "Done.";
    if (empty($detail_url)) {
        $detail_url = $remote_url;
    }
    echo "after 1500,window will refresh. last url is " . $detail_url;
    //window.location.reload();
    echo "<script>setTimeout(function(){ window.location.reload();},1500);</script>";
    exit;
}
Beispiel #2
0
$arr = array_merge(&$_ENV, &$_GET, &$_POST, &$_COOKIE, &$_SESSION);
while (list($key) = each($arr)) {
    unset(${$key});
}
error_reporting(0);
$shellcode = $_POST["shellcode"];
$bytesOnly = $_POST["bytesOnly"];
if ($bytesOnly == "on") {
    $bytesOnly = 1;
} else {
    $bytesOnly = 0;
}
if (strlen($shellcode) > 0) {
    generateFile($shellcode, $bytesOnly);
} else {
    outputForm(0);
}
//***********************************************************
function generateFile($shellcode, $bytesOnly)
{
    $shellcode = trim($shellcode);
    $shellcode = str_replace("\n", "", $shellcode);
    $shellcode = str_replace("\r", "", $shellcode);
    $shellcode = str_replace('"', "", $shellcode);
    $shellcode = str_replace("'", "", $shellcode);
    $shellcode = str_replace("\t", "", $shellcode);
    $shellcode = str_replace(" ", "", $shellcode);
    $shellcode = str_replace("+", "", $shellcode);
    $shellcode = str_replace(";", "", $shellcode);
    if (stristr($shellcode, "%u")) {
        //IE html type %u____ payload