Advertisement
dutchman-ICH

Dork

Jun 11th, 2020
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. <?php
  2. /**
  3. *---GOOGLE DORKER BY TEAM ICH----- V2 of HAMMER DORKER THSTS BY PR070N LEET--
  4. **/
  5. define('CSE_TOKEN', 'partner-pub-2698861478625135:3033704849');
  6. function Curl ($url, $post = 0, $headers = 0, $proxy = 0){
  7. $ch = curl_init();
  8. $options = array(
  9. CURLOPT_URL => $url,
  10. CURLOPT_RETURNTRANSFER => true,
  11. CURLOPT_SSL_VERIFYPEER => false,
  12. CURLOPT_SSL_VERIFYHOST => false,
  13. CURLOPT_FOLLOWLOCATION => true,
  14. CURLOPT_TIMEOUT => 30,
  15. CURLOPT_HEADER => true,
  16. );
  17. if($proxy){
  18. $options[CURLOPT_PROXY] = $proxy;
  19. $options[CURLOPT_PROXYTYPE] = CURLPROXY_SOCKS5;
  20. }
  21. if($post){
  22. $options[CURLOPT_POST] = true;
  23. $options[CURLOPT_POSTFIELDS] = $post;
  24. }
  25. if($headers){
  26. $options[CURLOPT_HTTPHEADER] = $headers;
  27. }
  28. curl_setopt_array($ch, $options);
  29. $response = curl_exec($ch);
  30. $httpcode = curl_getinfo($ch);
  31. if(!$httpcode) return "Curl Error : ".curl_error($ch); else{
  32. $header = substr($response, 0, curl_getinfo($ch, CURLINFO_HEADER_SIZE));
  33. $body = substr($response, curl_getinfo($ch, CURLINFO_HEADER_SIZE));
  34. curl_close($ch);
  35. return array($header, $body);
  36. }
  37. }
  38. function get_string($string, $start, $end){
  39. $str = explode($start, $string);
  40. $str = explode($end, $str[1]);
  41. return $str[0];
  42. }
  43. function banner (){
  44. print " _________ _______ _________\n";
  45. print " \__ __/( ____ \\__ __/\n";
  46. print " ) ( | ( \/ ) ( \n";
  47. print " | | | | | | \n";
  48. print " | | | | | | \n";
  49. print " | | | | | | \n";
  50. print " ___) (___| (____/\ | | \n";
  51. print " \_______/(_______/ )_( \n";
  52. print " Version : 2.0 | By KRISHANU\n\n";
  53. print " Old tool :hammer| By PR0T0N 1337\n\n";
  54. print " GOOGLE DORKER | By KRISHANU\n\n";
  55. }
  56. banner();
  57. echo "# Enter Your Dork : "; $dork = fgets(STDIN);
  58. $i = 0;
  59. while(true){
  60. $headers = array();
  61. $headers[] = 'Referer: https://cse.google.com/cse?cx='.CSE_TOKEN;
  62. $headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.'.rand(0000, 3333).'.169 Safari/537.36';
  63. $getInfo = Curl("https://cse.google.com/cse.js?hpg=1&cx=".CSE_TOKEN, 0, $headers);
  64. preg_match('#"cselibVersion": "(.*?)"#si', $getInfo[1], $csiLib); // CSILIB
  65. preg_match('#"cx": "(.*?)"#si', $getInfo[1], $cx); // CX
  66. preg_match('#"cse_token": "(.*?)"#si', $getInfo[1], $cseToken); // CSE TOKEN
  67. preg_match('#"exp": \["(.*?)", "(.*?)"\]#si', $getInfo[1], $exp); // EXP
  68. preg_match('#"resultSetSize": "(.*?)"#si', $getInfo[1], $rsz); // RSZ
  69. $url = "https://cse.google.com/cse/element/v1?rsz=".$rsz[1]."&num=10&&start=".$i."&hl=en&source=gcsc&gss=.com&cselibv=".$csiLib[1]."&cx=".$cx[1]."&q=".rawurlencode($dork)."&safe=off&cse_tok=".$cseToken[1]."&exp=".$exp[1].",".$exp[2]."&callback=google.search.cse.api16950";
  70. $json = Curl($url, 0, $headers);
  71. preg_match_all('#"clicktrackUrl": "(.*?)"#si', $json[1], $trackUrl);
  72. if($trackUrl[1] != NULL){
  73. foreach($trackUrl[1] as $index => $key){
  74. echo urldecode(get_string($key, '&q=', '&sa'))."\n";
  75. }
  76. }else{
  77. echo "{!} DONE!\n";
  78. exit();
  79. }
  80. $i = $i+10;
  81. }
  82. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement