md5($plainpass[1]

[php]<?php
$time = microtime();
$time = explode(’ ', $time);
$time = $time[1] + $time[0];
$start = $time;
$invalid = ‘0’;
echo ‘Browse|Search|update|


’;

echo str_repeat(’ ‘, 256).’

’; flush();
ob_start();
include(‘sql.php’);
include(‘functions.php’);
mysql_select_db($dbname, $con);
$nh = ‘0’;
$ru = ‘0’;
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}

$pp = $_POST[“data”];
$delim = $_POST[“delim”];
$last = ‘0’;

$data = explode("\n", $pp);
$resultf = array_unique($data);
$tot = count($resultf);
$dupl = count($data) - count($resultf);
echo $dupl . ’ Duplicates Removed… Processing ’ . $tot . ’ Records.’;
echo ‘

’;

// create_progress();
$counter = ‘0’;
foreach ($resultf as $line) {
$plainpass = explode($delim, $line);
++$counter;
if (md5($plainpass[1]) != $plainpass[0]){
next($resultf);
++$invalid;
}

if(recordExists(‘passhash’,$plainpass[0])){

mysql_query(“UPDATE megatable SET plainpass = '” . $plainpass[1] . “’ WHERE passhash = '” . $plainpass[0] . “’ AND plainpass = ‘’”);

$ru = $ru + mysql_affected_rows();

}
else{
mysql_query(“INSERT INTO megatable (passhash, plainpass) VALUES (’” . $plainpass[0] . “’, '” . $plainpass[1] . “’)”);
$nh = $nh + mysql_affected_rows();

}
$prog = $counter / $tot * 100;
$prog = round($prog);
if($last != $prog){update_progress($prog);}

$last = $prog;
unset($result[$last]);
}
mysql_close($con);
echo ‘
done’;
echo ‘
’ . $nh . ’ New Hashes added to Db’;

echo ‘
’ . $ru . ‘Hashes Updated with plainpass’;
echo ‘
From ’ . $tot . ’ Unique inputs’;
echo “
” . $invalid . " Illegal Entries Ignored.
";
echo ‘

’;
$time = microtime();
$time = explode(’ ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo ‘Page generated in ‘.$total_time.’ seconds.’."\n";
?> [/php]

for some reason
[php] if (md5($plainpass[1]) != $plainpass[0]){
next($resultf);
++$invalid;[/php]
that bit always shows that one record is valid and all the rest dont match the md5 command

i realise the ++$invalid is a line later than it should be … this was while i was playing with a solution… it belongs before the next

nevermind … im going to get help from a site where u can edit posts… u guys are teh suck
sif not have edit post feature

Editing posts is not available only for new users such as you to prevent spam.

Sponsor our Newsletter | Privacy Policy | Terms of Service