Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- *************************************
- * GoAhead IP Camera Exploit Filter *
- *************************************
- * THIS IS A PRIVATE FILE. *
- * YOU SHOULD NOT HAVE THIS. *
- * IF YOU LEAK THIS, AT LEAST LEAVE *
- * CREDIT TO THE AUTHOR IN THE *
- * COMMENTS BELOW. *
- *************************************
- * EXPLOIT FOUNDER: *
- * * Pierre Kim *
- *************************************
- * SCRIPT AUTHOR: *
- * * Jester *
- * INSTAGRAM: *
- * * thejesterino *
- * TWITTER: *
- * * @xJesterino *
- * HACKFORUMS UID: *
- * * 2978478 *
- *************************************
- * * Backdoors removed! *
- *************************************
- * * #OstrichGang *
- * * #CanadianGang$ *
- * ***********************************
- */
- $list = "poop.txt";
- $port = "8081";
- $output = "GoAhead-Filtered.txt";
- function in_array_r($item, $array) {
- return preg_match('/"' . $item . '"/i', json_encode($array));
- }
- file($list);
- ForEach ($file as $line) {
- $ip = $line;
- $ip = trim($ip);
- $url = 'http://' . $ip . ':' . $port;
- $ch = curl_init();
- $headers = [];
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_TIMEOUT, 1);
- // this function is called by curl for each header received
- curl_setopt($ch, CURLOPT_HEADERFUNCTION, function ($curl, $header) use (&$headers) {
- $len = strlen($header);
- $header = explode(':', $header, 2);
- if (count($header) < 2) // ignore invalid headers
- return $len;
- $name = strtolower(trim($header[0]));
- if (!array_key_exists($name, $headers)) $headers[$name] = [trim($header[1]) ];
- else $headers[$name][] = trim($header[1]);
- return $len;
- });
- $data = curl_exec($ch);
- if (in_array_r("GoAhead-Webs", $headers)) {
- echo "GoAhead Found";
- $data = $ip . ":" . $port . "";
- file_put_contents($output, $data, FILE_APPEND | LOCK_EX);
- } else {
- echo "Not A GoAhead Device or Dead....";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment