Advertisement
Guest User

Untitled

a guest
Jun 11th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. For example, i've added an user by hand, password hash is:
  2.  
  3. 33cfc0eebba3737b243574315b1bc302fc4222b5
  4.  
  5. and the check is done by:
  6.  
  7. if($result = $mysqli->query("Select * from utenti where username='".$mysqli->real_escape_string($_POST['username'])."' and password=sha1('".$mysqli->real_escape_string($_POST['password'])."')")){
  8.  
  9. so the sha1 function is mysql function, and the query works fine..
  10. now sha1 created by mysql are like:
  11.  
  12. 64376437383463653536363537306661333538626164356539346333626365386264653739356532
  13.  
  14. so much longher.. and there are no hex digits like abcdef...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement