Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include 'debian.php';
- $username = htmlspecialchars($_POST['username']);
- $password = htmlspecialchars($_POST['password']);
- $uid = addslashes($username);
- $pwd = addslashes($password);
- $binary = pack('a',$pwd);
- $enc = encrypt($binary);
- $sql = "SELECT account, password FROM user_auth WHERE account='$uid'";
- $stmt = sqlsrv_query( $conn, $sql );
- if( $stmt === false) {
- die( print_r( sqlsrv_errors(), true) );
- }
- if( sqlsrv_fetch( $stmt ) === False) {
- die( print_r( sqlsrv_errors(), false));
- }
- $rows = sqlsrv_has_rows( $stmt );
- if ($rows === true) {
- echo "Found. <br />";
- $pwdformat = (string) sqlsrv_get_field( $stmt, 1);
- echo bin2hex($pwdformat);
- }
- else {
- echo "None <br />";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement