CoderPirata

XPL SEARCH 0.2

Jul 11th, 2015
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 20.96 KB | None | 0 0
  1. <?php
  2. /*
  3.  
  4. Official repository - https://github.com/CoderPirata/XPL-SEARCH/
  5.  
  6. -------------------------------------------------------------------------------
  7. [ XPL SEARCH 0.2 ]-------------------------------------------------------------
  8. -This tool aims to facilitate the search for exploits by hackers, currently is able to find exploits in 5 database:
  9. * Exploit-DB
  10. * MIlw0rm
  11. * PacketStormSecurity
  12. * IEDB
  13. * IntelligentExploit
  14.  
  15. -------------------------------------------------------------------------------
  16. [ TO RUN THE SCRIPT ]----------------------------------------------------------
  17. PHP Version       5.6.8
  18.  php5-cli         Lib
  19. cURL support      Enabled
  20.  php5-curl        Lib
  21. cURL Version      7.40.0
  22. allow_url_fopen   On
  23. Permission        Writing
  24.  
  25. -------------------------------------------------------------------------------
  26. [ ABOUT DEVELOPER ]------------------------------------------------------------
  27. NAME              CoderPirata
  28. Email             [email protected]
  29. Blog              http://coderpirata.blogspot.com.br/
  30. Twitter           https://twitter.com/coderpirata
  31. Google+           https://plus.google.com/103146866540699363823
  32. Pastebin          http://pastebin.com/u/CoderPirata
  33. Github            https://github.com/coderpirata/
  34.  
  35. -------------------------------------------------------------------------------
  36. [ LOG ]------------------------------------------------------------------------
  37.  
  38. 0.1 - [02/07/2015]
  39. - Started.
  40.  
  41. 0.2 - [12/07/2015]
  42. - Add Exploit-DB.
  43. - Add Colors, only for linux!
  44. - Add Update Function.
  45. - "Generator" of User-Agent reworked.
  46. - Small errors and adaptations.
  47.  
  48. */
  49.  
  50. ini_set('error_log',NULL);
  51. ini_set('log_errors',FALSE);
  52. ini_restore("allow_url_fopen");
  53. ini_set('allow_url_fopen',TRUE);
  54. ini_set('display_errors', FALSE);
  55. ini_set('max_execution_time', FALSE);
  56.  
  57. $oo = getopt('h::s:p:a::', ['update::', 'help::', 'search:', 'proxy:', 'proxy-login', 'about::', 'respond-time:', 'banner-no::']);
  58.  
  59. function banner(){
  60. if(!extension_loaded("curl")){$cr = cores("red")."LIB cURL disabled, some functions may not work correctly!\n".cores("end");}  
  61. return cores("grey")."
  62. Yb  dP 88\"\"Yb 88         .dP\"Y8 888888    db    88\"\"Yb  dP\"\"b8 88  88
  63. YbdP  88__dP 88         `Ybo.\" 88__     dPYb   88__dP dP   `\" 88  88
  64. dPYb  88\"\"\"  88  .o     o.`Y8b 88\"\"    dP__Yb  88\"Yb  Yb      888888
  65. dP  Yb 88     88ood8     8bodP' 888888 dP\"\"\"\"Yb 88  Yb  YboodP 88  88".cores("red")." 0.2
  66. ".cores("grey2")."-------------------------------------------------------------------------------".cores("grey")."
  67. {$cr}
  68. HELP: {$_SERVER["SCRIPT_NAME"]} ".cores("blue")."--help".cores("grey")."
  69. USAGE: {$_SERVER["SCRIPT_NAME"]} ".cores("blue")."--search ".cores("grey")."\"name to search\"
  70. ".cores("grey2")."-------------------------------------------------------------------------------\n";
  71. }
  72.  
  73. function help(){
  74. $n = $_SERVER["SCRIPT_NAME"];
  75. die(cores("grey")."
  76. \t 88  88 888888 88     88\"\"Yb oP\"Yb.
  77. \t 88  88 88__   88     88__dP \"'.dP'
  78. \t 888888 88\"\"   88  .o 88\"\"\"    8P  
  79. \t 88  88 888888 88ood8 88      (8)  
  80.  
  81. ".cores("grey2")."-------------------------------------------------------------------------------
  82. [ ".cores("grey")."MAIN COMMANDS".cores("grey2")." ]--------------------------------------------------------------".cores("grey")."
  83.  
  84. COMMAND: ".cores("blue")."--search".cores("grey")." ~ Simple search
  85.         Example: {$n} ".cores("blue")."--search ".cores("grey")."\"name to search\"
  86.           Other: {$n} ".cores("blue")."-s ".cores("grey")."\"name to serch\"
  87.  
  88. COMMAND: ".cores("blue")."--help".cores("grey")." ~ For view HELP
  89.         Example: {$n} ".cores("blue")."--help".cores("grey")."
  90.           Other: {$n} ".cores("blue")."-h".cores("grey")."
  91.  
  92. COMMAND: ".cores("blue")."--about".cores("grey")." ~ For view ABOUT
  93.         Example: {$n} ".cores("blue")."--about".cores("grey")."
  94.           Other: {$n} ".cores("blue")."-a".cores("grey")."
  95.  
  96. COMMAND: ".cores("blue")."--update".cores("grey")." ~ Command for update the script.
  97.         Example: {$n} ".cores("blue")."--update".cores("grey2")."
  98.  
  99. -------------------------------------------------------------------------------
  100. [ ".cores("grey")."OTHERS COMMANDS".cores("grey2")." ]------------------------------------------------------------".cores("grey")."
  101.  
  102. COMMAND: ".cores("blue")."--proxy".cores("grey")." ~ Set which proxy to use to perform searches in the dbs.
  103.         Example: {$n} ".cores("blue")."--proxy".cores("grey")." 127.0.0.1:80
  104.                  {$n} ".cores("blue")."--proxy".cores("grey")." 127.0.0.1
  105.           Other: {$n} ".cores("blue")."--p".cores("grey")."
  106.  
  107. COMMAND: ".cores("blue")."--proxy-login".cores("grey")." ~ Set username and password to login on the proxy, if necessary.
  108.         Example: {$n} ".cores("blue")."--proxy-login".cores("grey")." user:pass
  109.  
  110. COMMAND: ".cores("blue")."--respond-time".cores("grey")." ~ Command to set the maximum time(in seconds) that the databases have for respond.
  111.         Example: {$n} ".cores("blue")."--respond-time".cores("grey")." 30
  112.  
  113. COMMAND: ".cores("blue")."--banner-no".cores("grey")." ~ Command for does not display the banner.
  114.         Example: {$n} ".cores("blue")."--banner-no".cores("grey2")."
  115.  
  116. -------------------------------------------------------------------------------\n");
  117. }
  118.  
  119. function about(){
  120. die(cores("grey")."
  121. \t    db    88\"\"Yb  dP\"Yb  88   88 888888
  122. \t   dPYb   88__dP dP   Yb 88   88   88  
  123. \t  dP__Yb  88\"\"Yb Yb   dP Y8   8P   88  
  124. \t dP\"\"\"\"Yb 88oodP  YbodP  `YbodP'   88  
  125.  
  126. ".cores("grey2")."-------------------------------------------------------------------------------
  127. [ ".cores("grey")."XPL SEARCH 0.2".cores("grey2")." ]-------------------------------------------------------------".cores("grey")."
  128. ".cores("blue")."--".cores("grey")." This tool aims to facilitate the search for exploits by hackers, currently is able to find exploits in 5 database:
  129. ".cores("blue")."*".cores("grey")." Exploit-DB
  130. ".cores("blue")."*".cores("grey")." MIlw0rm
  131. ".cores("blue")."*".cores("grey")." PacketStormSecurity
  132. ".cores("blue")."*".cores("grey")." IEDB
  133. ".cores("blue")."*".cores("grey")." IntelligentExploit
  134.  
  135. ".cores("grey2")."-------------------------------------------------------------------------------
  136. [ ".cores("grey")."TO RUN THE SCRIPT".cores("grey2")." ]----------------------------------------------------------".cores("grey")."
  137. PHP Version       ".cores("blue")."5.6.8".cores("grey")."
  138. php5-cli         ".cores("blue")."Lib".cores("grey")."
  139. cURL support      ".cores("blue")."Enabled".cores("grey")."
  140. php5-curl        ".cores("blue")."Lib".cores("grey")."
  141. cURL Version      ".cores("blue")."7.40.0".cores("grey")."
  142. allow_url_fopen   ".cores("blue")."On".cores("grey")."
  143. Permission        ".cores("blue")."Writing".cores("grey2")."
  144.  
  145. -------------------------------------------------------------------------------
  146. [ ".cores("grey")."ABOUT DEVELOPER".cores("grey2")." ]------------------------------------------------------------".cores("grey")."
  147. NAME              ".cores("blue")."CoderPirata".cores("grey")."
  148. Email             ".cores("blue")."[email protected]".cores("grey")."
  149. Blog              ".cores("blue")."http://coderpirata.blogspot.com.br/".cores("grey")."
  150. Twitter           ".cores("blue")."https://twitter.com/coderpirata".cores("grey")."
  151. Google+           ".cores("blue")."https://plus.google.com/103146866540699363823".cores("grey")."
  152. Pastebin          ".cores("blue")."http://pastebin.com/u/CoderPirata".cores("grey")."
  153. Github            ".cores("blue")."https://github.com/coderpirata/".cores("grey2")."
  154. -------------------------------------------------------------------------------\n");
  155. }
  156.  
  157. function cores($nome){
  158. $cores = array("red"     => "\033[1;31m", "green"   => "\033[0;32m", "blue"    => "\033[1;34m",
  159.                "end"     => "\033[0m",    "grey2"   => "\033[1;30m", "grey"    => "\033[0;37m");
  160. if(substr(strtolower(PHP_OS), 0, 3) != "win"){ return $cores[strtolower($nome)]; }
  161. }
  162.  
  163. function infos($OPT){
  164. if(!empty($OPT["proxy"]))$proxyR = "\n| ".cores("grey")."PROXY - ".cores("blue").$OPT["proxy"];
  165. if(!empty($OPT["time"])){$timeL  = cores("blue").$OPT["time"].cores("grey")." sec"; }else{ $timeL = cores("blue")."INDEFINITE"; }  
  166. return cores("grey2").".-[ ".cores("grey")."Infos".cores("grey2")." ]-------------------------------------------------------------------~
  167. | ".cores("grey")."SEARCH FOR  ".cores("blue")."{$OPT["find"]}".cores("grey2")."{$proxyR}
  168. | ".cores("grey")."TIME LIMIT FOR DBS RESPOND {$timeL}".cores("grey2")."
  169. '-----------------------------------------------------------------------------~\n\n";
  170. }
  171.  
  172. function update($OPT){
  173. echo cores("grey")."\nUpdating, wait...\n";
  174.  
  175. $OPT["url"] = "https://raw.githubusercontent.com/CoderPirata/XPL-SEARCH/master/xpl%20search.php";
  176. $update = browser($OPT);
  177.  
  178. preg_match_all('#(H77PR365UL7::!!::!!:(.*?):)#', $update, $rm);
  179. $update = str_replace("(H77PR365UL7::!!::!!:".$rm[2][0].":) ", "", $update);
  180. if(!eregi("#END", $update)){ die(cores("red")."\nIt seems that the code has not been fully updated.\n Canceled update, try again...\n".cores("end")); }
  181.  
  182. file_put_contents(__FILE__,  $update);
  183. die(cores("green")."\nUpdate DONE!");
  184. }
  185.  
  186. function browser($browser){
  187. $resultado=array();
  188.  
  189. $UA[1] = array("SeaMonkey", "Mobile", "Opera", "Safari", "GoogleBot", "K-Meleon", "SO"  => array("NetSecL Linux", "Dragora Linux", "ArchBSD", "Ubunto Linux", "Android", "Debian Linux"), "LNG" => array("en-US", "pt-BR", "cs-CZ", "pt_PT", "ru-RU", "en-IN") );
  190. $UA[2] = array("Firefox", "Mobile", "Opera", "Safari", "GoogleBot", "Galaxy", "SO"  => array("5.1.2600", "6.0", "6.1.7601", "6.2", "6.3", "6.4"), "LNG" => array("en-US", "pt-BR", "cs-CZ", "pt_PT", "ru-RU", "en-IN") );
  191. if(rand(1,2)==1){  
  192. $UserAgent = "XPL SEARCH - ".$UA[1][rand(0,5)]."./".rand(0,5).".".rand(0,5)." (".$UA[1]["SO"][rand(0,5)]."; ".$UA[1]["LNG"][rand(0,5)].";)";   
  193. }else{
  194. $UserAgent = "XPL SEARCH - Mozilla/5.0 (Windows NT ".$UA[2]["SO"][rand(0,5)]."; ".$UA[2]["LNG"][rand(0,5)].") (KHTML, like Gecko) ".$UA[2][rand(0,5)]."/".rand(5,15).".".rand(10,25);
  195. }
  196.  
  197. if(extension_loaded("curl")){
  198. $ch = curl_init();
  199. curl_setopt($ch, CURLOPT_URL, $browser["url"]);
  200. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
  201.  
  202. if(!empty($browser["proxy"])){
  203.  curl_setopt($ch, CURLOPT_PROXY, $browser["proxy"]);
  204.  
  205. if(!empty($browser["proxy-login"])){
  206.  curl_setopt($ch, CURLOPT_PROXYUSERPWD, $browser["proxy-login"]);
  207. }
  208. }
  209.  
  210. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  211. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  212.  
  213. if(!empty($browser["time"])){
  214.  curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $browser["time"]);
  215.  curl_setopt( $ch, CURLOPT_TIMEOUT, $browser["time"]);
  216. }
  217.  
  218. curl_setopt($ch, CURLOPT_USERAGENT, $UserAgent);
  219. curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  220.  
  221. if(!empty($browser["post"])){ curl_setopt($ch, CURLOPT_POSTFIELDS, $browser["post"]); }
  222.  
  223. curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
  224. curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
  225.  
  226. $resultado = curl_exec($ch);
  227. $status = curl_getinfo($ch);
  228. curl_close($ch);
  229. $resultado = "(H77PR365UL7::!!::!!:{$status["http_code"]}:) ".$resultado;
  230. }else{
  231. $opts = array(
  232.     'http' => array ('request_fulluri' => true, 'user_agent' => $UserAgent),
  233.     'https' => array ('request_fulluri' => true, 'user_agent' => $UserAgent) );
  234.  
  235. if(empty($browser["post"])){
  236. $opts['http']['method']  = "GET";
  237. $opts['https']['method'] = "GET";
  238. }else{
  239. $opts['http']['content']  = $browser["post"];
  240. $opts['http']['method']  = "GET";
  241. $opts['https']['content'] = $browser["post"];
  242. $opts['https']['method'] = "GET";
  243. }
  244.  
  245. if($browser["time"]!=""){
  246. $opts['http']['method']  = $browser["time"];
  247. $opts['https']['content'] = $browser["time"];
  248. }
  249.  
  250. if($browser["proxy"]!=""){
  251. $opts['http']['proxy']  = $browser["proxy"];
  252. $opts['https']['proxy'] = $browser["proxy"];
  253.  
  254. if(!empty($browser["proxy-login"])){
  255. $opts['http']['header']  = "Proxy-Authorization: Basic ".base64_encode($browser["proxy-login"]);
  256. $opts['https']['header'] = "Proxy-Authorization: Basic ".base64_encode($browser["proxy-login"]);
  257. }
  258. }
  259.  
  260. $scc = stream_context_create($opts);
  261. $resultado = "(H77PR365UL7::!!::!!:333:)".file_get_contents($browser["url"],false,$scc);
  262.  
  263. }
  264.  
  265. return $resultado;
  266. }
  267.  
  268. ####################################################################################################
  269. ## DATABASES
  270.  
  271. function milw00rm($OPT){
  272. echo "\n".cores("grey2")."[ ".cores("grey")."MILW00RM.org ".cores("grey2")."]:: "; 
  273. $resultado=NULL;
  274. $info = array('search' => $OPT["find"], 'Submit' => 'Submit');
  275. $browser = array("url" => "http://milw00rm.org/search.php", "proxy" => $OPT["proxy"], "post" => $info, "time" => $OPT["time"]);
  276. $resultado = browser($browser);
  277. if(empty($resultado)){ echo cores("grey2")."Retrying... "; $resultado = browser($browser); }
  278. if(empty($resultado)){ echo cores("red")."Error with the connection...\n\n".cores("end"); goto saida; }
  279.  
  280. if(!eregi('<td class="style1">-::DATE</td>', $resultado)){
  281. echo cores("red")."NOT FOUND\n".cores("end");
  282. }else{
  283. echo cores("green")."FOUND".cores("grey2")."\n.------------------------------------------------------------------------------\n|\n".cores("grey")."";
  284. preg_match_all('#<a href="(.*?)" target="_blank" class="style1">(.*?)</a>#', $resultado, $a);
  285. foreach($a[0] as $v){
  286. $var = str_replace('<a href="', cores("grey")."LINK:: ".cores("blue")."http://milw00rm.org/", $v);
  287. $var = str_replace('" target="_blank" class="style1">', "\n".cores("grey")."NAME:: ".cores("blue")."", $var);
  288. $var = str_replace("</a>", "", $var);
  289. $fim = explode("\n", $var);
  290. echo cores("grey2")."| ".htmlspecialchars_decode($fim[1])."\n".cores("grey2")."| ".$fim[0]."\n".cores("grey2")."|\n";
  291. }
  292. echo cores("grey2")."'------------------------------------------------------------------------------\n";
  293. }
  294. saida:
  295. }
  296.  
  297. function packetstormsecurity($OPT){
  298. echo "\n".cores("grey2")."[ ".cores("grey")."PACKETSTORMSECURITY.com ".cores("grey2")."]:: ";
  299. $resultado=NULL;
  300. $id_pages=2;
  301. $id_info=0;
  302.  
  303. $browser = array("url" => "https://packetstormsecurity.com/search/?q={$OPT["find"]}", "proxy" => $OPT["proxy"], "time" => $OPT["time"], "post" => "");
  304. $resultado = browser($browser);
  305. if(empty($resultado)){ echo cores("grey2")."Retrying... "; $resultado = browser($browser); }
  306. if(empty($resultado)){ echo cores("red")."Error with the connection...\n\n".cores("end"); goto saida; }
  307.  
  308. if(eregi('<title>No Results Found', $resultado)){
  309. echo cores("red")."NOT FOUND\n".cores("end");
  310. }else{
  311. echo cores("green")."FOUND\n".cores("grey2").".------------------------------------------------------------------------------\n|\n";
  312. while($id_pages < 100){
  313. preg_match_all('#<a class="ico text-plain" href="(.*?)" title="(.*?)">(.*?)<\/a>#', $resultado, $a);
  314.  
  315. while($id_info < count($a[0])){
  316. echo cores("grey2")."| ".cores("grey")."NAME:: ".cores("blue")."".htmlspecialchars_decode($a[3][$id_info])."\n";
  317. preg_match_all('#/files/(.*?)/#', $a[1][$id_info], $ab);
  318. echo cores("grey2")."| ".cores("grey")."LINK:: ".cores("blue")."https://packetstormsecurity.com/files/{$ab[1][0]}/\n";
  319. echo cores("grey2")."|\n";
  320. $id_info++;
  321. }
  322.  
  323. if(eregi('accesskey="]">Next</a>', $resultado)){
  324. $browser["url"]="https://packetstormsecurity.com/search/files/page{$id_pages}/?q={$OPT["find"]}";
  325. $resultado = browser($browser);
  326. }else{ goto fim_; }
  327.  
  328. $id_pages++;
  329. }
  330.  
  331. fim_:
  332. echo cores("grey2")."'------------------------------------------------------------------------------\n";
  333. }
  334. saida:
  335. }
  336.  
  337. function iedb($OPT){
  338. echo "\n".cores("grey2")."[ ".cores("grey")."IEDB.ir ".cores("grey2")."]:: ";  
  339. $resultado=NULL;
  340. $info = array('search' => $OPT["find"], 'Submit' => 'Submit');
  341. $browser = array("url" => "http://iedb.ir/search.php", "proxy" => $OPT["proxy"], "post" => $info, "time" => $OPT["time"]);
  342. $resultado = browser($browser);
  343. if(empty($resultado)){ echo cores("grey2")."Retrying... "; $resultado = browser($browser); }
  344. if(empty($resultado)){ echo cores("red")."Error with the connection...\n\n".cores("end"); goto saida; }
  345.  
  346. if(!eregi('<td class="style1">-::DATE</td>', $resultado)){
  347. echo cores("red")."NOT FOUND\n".cores("end");
  348. }else{
  349. echo cores("green")."FOUND\n".cores("grey2").".------------------------------------------------------------------------------\n|\n";
  350. preg_match_all('#<a href="(.*?)" target="_blank" class="style1">(.*?)</a>#', $resultado, $a);
  351. foreach($a[0] as $v){
  352. $var = str_replace('<a href="', cores("grey")."LINK:: ".cores("blue")."http://iedb.ir/", $v);
  353. $var = str_replace('" target="_blank" class="style1">', "\nNAME:: ".cores("blue")."", $var);
  354. $var = str_replace("</a>", "", $var);
  355. $fim = explode("\n", $var);
  356. echo cores("grey2")."| ".cores("grey").htmlspecialchars_decode($fim[1])."\n".cores("grey2")."| ".$fim[0]."\n".cores("grey2")."|\n";
  357. }
  358. echo cores("grey2")."'------------------------------------------------------------------------------\n";
  359. }
  360. saida:
  361. }
  362.  
  363. function intelligentexploit($OPT){
  364. echo "\n".cores("grey2")."[ ".cores("grey")."INTELLIGENTEXPLOIT.com ".cores("grey2")."]:: ";
  365. $resultado=NULL;
  366. $browser = array("url" => "http://www.intelligentexploit.com/api/search-exploit?name=".$OPT["find"], "proxy" => $OPT["proxy"], "post" => "", "time" => $OPT["time"]);
  367. $resultado = browser($browser);
  368. preg_match_all('#(H77PR365UL7::!!::!!:(.*?):)#', browser($browser), $http_code, PREG_SET_ORDER);
  369. if($http_code[0][2] < 207 and $http_code[0][2]!=0){ goto pula_catraca; }
  370. if($http_code[0][2] == 0){
  371. if(empty($resultado)){ echo cores("grey2")."Retrying... "; $resultado = browser($browser); }
  372. if(empty($resultado)){ echo cores("red")."Error with the connection...\n\n".cores("end"); goto saida; }
  373. }
  374. pula_catraca:
  375.  
  376. if(strlen($resultado)==27 or strlen($resultado)==26 or strlen($resultado)==25){
  377. echo cores("red")."NOT FOUND\n".cores("end");
  378. }else{
  379. echo cores("green")."FOUND\n".cores("grey2").".------------------------------------------------------------------------------\n|\n";
  380. preg_match_all('#{"id":"(.*?)","date":"(.*?)","name":"(.*?)"}#', $resultado, $a);
  381.  
  382. $i=0;
  383. while($i < count($a[0])){
  384. echo cores("grey2")."| ".cores("grey")."NAME:: ".cores("blue")."".htmlspecialchars_decode(str_replace("\/", "/", $a[3][$i]))."\n";
  385. echo cores("grey2")."| ".cores("grey")."LINK:: ".cores("blue")."https://www.intelligentexploit.com/view-details.html?id={$a[1][$i]}\n".cores("grey2")."|\n";
  386. $i++;
  387. }
  388. echo cores("grey")."'------------------------------------------------------------------------------\n";
  389. }
  390. saida:
  391. }
  392.  
  393. function exploitdb($OPT){
  394. echo "\n".cores("grey2")."[ ".cores("grey")."EXPLOIT-DB.com ".cores("grey2")."]:: ";   
  395. $resultado=NULL;
  396. $id_pages=2;
  397.  
  398. $browser = array("url" => "https://www.exploit-db.com/search/?action=search&description={$OPT["find"]}&text=&cve=&e_author=&platform=0&type=0&lang_id=0&port=&osvdb=", "proxy" => $OPT["proxy"], "time" => $OPT["time"]);
  399. $resultado = browser($browser);
  400. if(empty($resultado)){ echo cores("grey2")."Retrying... "; $resultado = browser($browser); }
  401. if(empty($resultado)){ echo cores("red")."Error with the connection...\n\n".cores("end"); goto saida; }
  402.  
  403. if(eregi('No results', $resultado)){
  404. echo cores("red")."NOT FOUND\n".cores("end");
  405. }else{
  406. echo cores("green")."FOUND\n".cores("grey2")."+------------------------------------------------------------------------------\n|\n";
  407.  
  408. while($id_pages < 100){ $id_info=0;
  409. preg_match_all('#<a href="https://www.exploit-db.com/exploits/(.*?)/">(.*?)</a>#', $resultado, $a, PREG_SET_ORDER);
  410.  
  411. while($id_info < count($a)){
  412. echo cores("grey2")."| ".cores("grey")."NAME:: ".cores("blue")."".htmlspecialchars_decode($a[$id_info][2])."\n";
  413. echo cores("grey2")."| ".cores("grey")."LINK:: ".cores("blue")."https://www.exploit-db.com/exploits/{$a[$id_info][1]}/".cores("grey2")."\n".cores("grey2")."|\n";
  414. $id_info++;
  415. }
  416.  
  417. if(eregi('>next</a>', $resultado)){
  418. $browser["url"]="https://www.exploit-db.com/search/?action=search&description={$OPT["find"]}&pg={$id_pages}&text=&cve=&e_author=&platform=0&type=0&lang_id=0&port=&osvdb=";
  419. $resultado = browser($browser);
  420. }else{ goto fim_; }
  421. $id_pages++;
  422. }
  423.  
  424. fim_:
  425. echo cores("grey2")."'------------------------------------------------------------------------------\n";
  426. }
  427. saida:
  428. }
  429.  
  430. ####################################################################################################
  431. ## CONFIGS
  432. $OPT = array();
  433. if(!isset($oo["banner-no"]))echo banner();
  434. if(isset($oo["h"]) or isset($oo["help"]))echo help();
  435. if(isset($oo["a"]) or isset($oo["about"]))echo about();
  436. if(isset($oo["s"])){$OPT["find"]=$oo["s"];}else{$O=1;}
  437. if(isset($oo["search"])){$OPT["find"]=$oo["search"];}else{$O=$O+1;}
  438. if(isset($oo["p"])){$OPT["proxy"]=$oo["p"];}
  439. if(isset($oo["proxy"])){$OPT["proxy"]=$oo["proxy"];}
  440. if(isset($oo["respond-time"])){$OPT["time"]=$oo["respond-time"];}
  441. if(isset($OPT["proxy-login"])){$OPT["proxy-login"]=$oo["proxy-login"];}
  442. if(isset($oo["update"])){ echo update($OPT); }
  443. if($O==2)die();
  444.  
  445. ####################################################################################################
  446. ## INFOS
  447. echo infos($OPT);
  448.  
  449. ####################################################################################################
  450. ## STARTING THE SEARCH
  451. echo exploitdb($OPT);
  452. echo milw00rm($OPT);
  453. echo packetstormsecurity($OPT);
  454. echo intelligentexploit($OPT);
  455. echo iedb($OPT);
  456.  
  457. #END
Advertisement
Add Comment
Please, Sign In to add comment