Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function user_not_valid()
- {
- die ('0');
- }
- function user_valid()
- {
- die ('1');
- }
- include 'connect_to_mysql.php';
- //GET_['a'] == login
- //GET_['b'] == md5 hash of password
- //GET_['c'] == md5 hash of hardware id
- //GET_['d'] == md5 hash (login+passwordMD5+hwidMD5+'check_user');
- if(isset($GET_['a']) && isset($GET_['b']) && isset($GET_['c']) && isset($GET_['d']))
- {
- $username = $GET_['a'];
- $password_hash = $GET_['b'];
- $hardwareID_hash = $GET_['c'];
- $request_hash = $GET_['d'];
- $username_length = strlen($username);
- if(strlen($password_hash) != 32 || strlen($hardwareID_hash) != 32 || strlen($request_hash) != 32)
- user_not_valid();
- if($username_length < 1 || $username_length > 32)
- user_not_valid();
- }else{
- user_not_valid();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement