MrLogin404

Joomla to ip

Dec 21st, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. <h3>Joomla</h3>
  2.  
  3. <?php
  4. echo '
  5. <form method="post" action="" enctype="multipart/form-data">
  6. <input type="text" name="ip" value="" placeholder="Extract From ip" size="15"> <input type=submit name=get value=Get />
  7. <br />
  8. <textarea name="sites" cols="40" rows="13">';
  9. if(isset($_POST['get']) && $_POST['ip'] != ""){
  10. $target = $_POST['ip'];
  11. $sites = mbing("ip:$target index.php?option=com");
  12. if(!empty($sites)){
  13. $targets = implode("\n",cln_arr(array_map("jos_site",$sites)));
  14. echo $targets;
  15. }else{
  16. echo "No Joomla Found.";
  17. }
  18. }
  19. echo '</textarea>';
  20.  
  21. function mbing($what){
  22. for($i = 1; $i <= 2000; $i += 10){
  23. $ch = curl_init();
  24. curl_setopt ($ch, CURLOPT_URL, "http://www.bing.com/search?q=".str_replace(" ","+", $what)."&first=$i");
  25. curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16");
  26. curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
  27. curl_setopt ($ch, CURLOPT_COOKIEFILE,getcwd().'/cookie.txt');
  28. curl_setopt ($ch, CURLOPT_COOKIEJAR, getcwd().'/cookie.txt');
  29. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  30. curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
  31. $data = curl_exec($ch);
  32. preg_match_all('#<h2 class="sb_h3 cttl"><a href="(https?://.*?)" _ctf="rdr_T"#',$data, $links);
  33. foreach($links[1] as $link){
  34. $allLinks[] = $link;
  35. }
  36. if(!preg_match('#class="sb_pagN"#',$data)) break;
  37. }
  38.  
  39. if(!empty($allLinks) && is_array($allLinks)){
  40. return array_unique($allLinks);
  41. }
  42. }
  43.  
  44. function cln_arr($array){
  45. return @array_filter(@array_unique($array));
  46. }
  47. function jos_site($site){
  48. return (preg_match("/option/",$site)) ? preg_replace("#(.*?)/index(.*)|(.*?)/?option(.*)#","$1/",$site):false;
  49. }
Add Comment
Please, Sign In to add comment