i want make php with login program c#

Status
Not open for further replies.

gean22

New member
i try all, error password incorret :/ pls help-meeee

PHP:
<?php
$link = mysqli_connect("localhost", "***", "***");
$database = mysqli_select_db($link, "***");


$user = $_GET['username'];
$password = $_GET['secret_key'];
$password = hash('sha256', $_POST['password']);
$hwid = $_GET['hwid'];
$tables = "xf_user";
$token = $_GET['token'];

$sql = "SELECT * FROM ". $tables ." WHERE username = '". mysqli_real_escape_string($link,$user) ."'" ;
$result = $link->query($sql);
if ($result->num_rows > 0) {
    // Outputting the rows
    while($row = $result->fetch_assoc())
    {

        // Password encryption and check
          $password = $row['secret_key'];
          $salt = $row['salt'];
          $plain_pass = $_GET['secret_key'];
       // $stored_pass = md5(md5($password) . $salt);
   //     $stored_pass = sha256(sha256($password) . $salt);
          $stored_pass = sha1(sha1($password) . $salt);


        // Status Holders
        $passwordstatus;
        $hwidstatus;

        echo "{<br>";

        if($stored_pass != $row['secret_key'])
        {
            echo "password: false<br>";
        }
        else
        {
            echo "password: true<br>";
        }

        echo "group: " . $row['user_group_id'] . "<br>";
        echo "additionalgroups: " . $row['secondary_group_ids'] . "<br>";

        if (strlen($row['hwid']) > 1)
        {
            if ($hwid != $row['hwid'])
            {
                echo "hwid: false<br>";
            }
            else
            {
                echo "hwid: true<br>";
            }
        }
        else
        {
            $sql = "UPDATE ". $tables ." SET hwid='$hwid' WHERE username='$user'";
            if(mysqli_query($link, $sql))
            {
                echo "hwid: true<br>";
            }
            else
            {
                echo "hwid: false<br>";
            }
        }
        
        echo "token: " . $_GET['token'] . "<br>";
        
        echo "}";
        
    }
}
else
{
   echo "password: false";
}
?>
 
If you require support, you will need to associate your forum user name with your license and post in the relevant forum.
 
Status
Not open for further replies.
Back
Top Bottom