Using this code and by adding my cgi-bin to my base dir i am able to get a dump of each of the usernames and passwords.
This was kinda copied, emm anyone know how to make the array so that it is in this format:
array[0] = array(
username => username,
password => password
);
array[1] = array(
username => username1,
password => password1
);
I think if i mind right its a multi diminutional array though i've only ever been able to make them with a database
$htfile = '/var/www/vhosts/mydomain.com/cgi-bin/8pewPo7kZ6gdEYArjS3s9GQhyNn5BFzu/password/.htpasswd';
if ( !file_exists($htfile ))
echo Array();
$res = Array();
foreach(file($htfile) as $l)
{
$array = explode(':',$l);
$user = $array[0];
$pass = chop($array[1]);
$res[$user] = $pass;
}