![]() |
|
|
#1 |
|
Архивный участник
Join Date: May 2006
Posts: 209
|
I dont know why but when im trying to SELECT answer1 and answer2 from user_auth allways its blank result!.
Code:
$query = "SELECT account, password, answer1, answer2 FROM user_auth WHERE account = 'account'";
$query_verificar = mssql_query ($query);
while ($row = mssql_fetch_array($query_verificar))
{
$respuesta1 = $row[answer1];
$respuesta2 = $row[answer2];
echo "Answer1: $respuesta1<br> Answer2: $respuesta2";
}
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Aug 2005
Posts: 394
|
EDIT:
Sorry my mistake. It's just for the fact it's binary. Binary cannot be displayed just like passwords. |
|
|
|
|
#3 |
|
Архивный участник
Join Date: Oct 2005
Posts: 113
|
There is no way for you to see passwords from there.
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Apr 2006
Posts: 118
|
Code:
function Mbin2string($binstr)
{
$out = "0x";
for($q=0; $q < strlen($binstr); $q++) {
$w = dechex(ord($binstr[$q]));
if(strlen($w)==1) $w = '0'.$w;
$out .= $w;
}
$out = strtoupper($out);
$out[1] = 'x';
return $out;
}
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Apr 2006
Posts: 120
|
It's just:
PHP Code:
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: May 2006
Posts: 209
|
I dont want to see the password (becaouse its impossible). I only want to see the row info. But my question its why all the time gives blank results.
PS: I use this to compare function (its a page for change password, I add to compare the $_POST['answer1] to compare with the answer1 in user_auth. Code:
$answer1_e = '0x' . bin2hex($respuesta1); |
|
|
|
|
#7 | |
|
Архивный участник
Join Date: Oct 2005
Posts: 113
|
Quote:
its like.. PHP Code:
|
|
|
|
|
|
#8 | |
|
Архивный участник
Join Date: Sep 2005
Posts: 1,014
|
Quote:
Code:
WHERE account = '".$_POST['account']."' AND |
|
|
|
|
|
#9 |
|
Архивный участник
Join Date: May 2006
Posts: 209
|
Yes I know but for now its for test. After I test I Put this L2cp modded function:
Code:
function seguridad1($strh) {
$banwordshh = array ("'", ",", ";", "--", "%", "-", "SELECT", "DROP", "UPDATE", "QUERY", "%", "IN", "UNION, "\"", "'");
if ( eregi ( "[a-zA-Z0-9]+", $strh ) ) {
$strh = str_replace ( $banwordshh, '', strtolower ( $strh ) );
} else {
$strh = NULL;
}
return $strh;
}
___
$account = $_POST['cuenta'];
$cuenta = seguridad1($cuenta);
query ("SELECT blababa WHERE account = '$cuenta'");
PS: I dont know but the array for the query always its blank result!!. |
|
|
|
|
#10 | ||
|
Архивный участник
Join Date: Oct 2005
Posts: 113
|
Quote:
Quote:
Try using something like this: PHP Code:
|
||
|
|
|
|