AbdulMuttaqin

[PHP] Google Dorker CLI Version

Oct 3rd, 2017
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. set_time_limit();
  4. ob_start();
  5. /*
  6. Name : Google Scanner v3
  7. Author : Shor7cut
  8. Link : http://facebook.com/bug7sec
  9. Comment : GO TO HELL script kiddies
  10.  
  11. {
  12. Live Coding :
  13. Author : Shor7cut
  14. View : Wisnu404
  15. }
  16.  
  17. \----
  18. IndoXploit , Tuban Cyber Team , Defacer Tersakiti Team
  19. ----/
  20. */
  21. function google_scan($dork,$page)
  22. {
  23. $kunAPI = "AIzaSyDPvzsGK3sdWUq8nHFzmYxu3mxrByjH2L8";
  24. $dork = urlencode($dork);
  25. $ch = curl_init();
  26. curl_setopt($ch,CURLOPT_URL,"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&hl=iw&rsz=8&q={$dork}&key=$kunAPI&start={$page}");
  27. curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
  28. $output=curl_exec($ch);
  29. curl_close($ch);
  30. $output = json_decode($output,true);
  31. if($output){
  32. return $output;
  33. }else{
  34. return false;
  35. }
  36. }
  37.  
  38. if(isset($argv['1'])){
  39. $data = google_scan(urlencode($argv['1']),"0");
  40.  
  41. if($data){
  42. foreach ($data['responseData']['cursor']['pages'] as $key => $data_page) {
  43. $data = google_scan(urlencode($argv['1']),$data_page['start']);
  44.  
  45. foreach ($data['responseData']['results'] as $key => $load_data) {
  46. /* anti double result */
  47. if($_SESSION[$load_data['unescapedUrl']]){
  48. }else{
  49. $_SESSION[$load_data['unescapedUrl']]="1";
  50. echo $load_data['unescapedUrl']."\r\n";
  51. }
  52. /*-------------------*/
  53. }
  54. }
  55. }else{
  56. echo "google caph\r\n";
  57. }
  58. }else{
  59. echo "php ".$argv[0]." {dork}\r\n";
  60. }
  61.  
  62.  
  63.  
  64. ?>
Add Comment
Please, Sign In to add comment