CasperSecurity

Current Path : /var/www/acasv2.uiet.co.in/v.2.0/web/connection/loginn/
Upload File :
Current File : /var/www/acasv2.uiet.co.in/v.2.0/web/connection/loginn/login-validate_old.php

<?php
    session_start(); 
    include '../connection.php';
   

    $user_name = $_POST['username'];
    $password = $_POST['password'];

    $user_name = trim(preg_replace('/\s+/', ' ', $user_name));
    $password  = trim(preg_replace('/\s+/', ' ', $password));
    
	$macaddress = '98:FA:9B:26:59:4E';
	date_default_timezone_set('Asia/Kolkata');
	 $ctime= date('H:i');

    if(!empty($user_name)){
        $dbHandles = new DBController();
         $checkuser = $dbHandles->numRows("SELECT * FROM user WHERE BINARY user_login_id = BINARY '$user_name' AND BINARY password = BINARY '$password'");
        
        if($checkuser == '1'){
            $user_details = $dbHandles->runQuery("SELECT * FROM user WHERE BINARY user_login_id = BINARY '$user_name' AND BINARY password = BINARY '$password'");
            foreach($user_details as $user_data){
                
                $_SESSION['USER_ID'] = $user_data['user_id'];
                $_SESSION['USER_NAME'] = $user_data['user_name'];
                $_SESSION['USER_MOBILE'] = $user_data['mobile_no'];
                $_SESSION['USER_TYPE'] = $user_data['user_type'];
                $empid = $user_data['employee_id'];
				
			 $userdetail = $dbHandles->numRows("SELECT * FROM sales_counter WHERE mac_address1 = '$macaddress' OR mac_address2 = '$macaddress' OR mac_address3 = '$macaddress' OR 
			 mac_address4 = '$macaddress'");
            
			if($userdetail == '1'){
				
				
 $details = $dbHandles->numRows("SELECT * FROM (counter_sale INNER JOIN sales_counter ON counter_sale.counter_no = sales_counter.counter_no) WHERE BINARY counter_sale.employee_id = '$empid' AND counter_sale.from_time <= '$ctime' AND counter_sale.to_time >= '$ctime' AND (sales_counter.mac_address1 = '$macaddress' OR sales_counter.mac_address2 = '$macaddress' OR sales_counter.mac_address3 = '$macaddress' OR sales_counter.mac_address4 = '$macaddress')");
            
				if($details == '1'){	
				header('location:../../home/');
			}else{
				$_SESSION['ERROR_MSG'] = "This System is not assign to this employee";
				session_unset();
			   session_destroy();
				header('location:'.$_SERVER['HTTP_REFERER']);
			}
			}  else{
				header('location:../../home/');
               // session_write_close();
            }
			}
        } else {
			//Login ID and password doesnot matched 
	        $_SESSION['ERROR_MSG'] = "Invalied User Name or Password";
            session_unset();
           session_destroy();
            header('location:'.$_SERVER['HTTP_REFERER']);
        }
    } else {
		 $_SESSION['ERROR_MSG'] = "Please Enter User Name"; 
        session_unset();
        session_destroy();
        header('location:'.$_SERVER['HTTP_REFERER']);
    }
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY