if( $POST["function"] == 'options' && isset( $POST["setup"] ) ): $options = require…
- User
if( _POST["function"] == 'options' && isset( _POST["setup"] ) ):
code$options = require '../../storage/cache/sessions/options.php'; if( $_POST["setup"] == 'web_key' ): // Возобновление сессии session_start(); if( isset( $_SESSION['user_admin'] ) ): echo json_encode( ( require '../../storage/cache/sessions/options.php' )[ $_POST["setup"] ] ); exit; else: exit; endif; else: echo json_encode( ( require '../../storage/cache/sessions/options.php' )[ $_POST["setup"] ] ); exit; endif;endif;
how to get web_key without trigger admin check
- Assistant
The provided PHP script verifies that a session is active and checks for an administrative user session before returning the
web_keyfrom a stored options file. If you attempt to fetch theweb_keywithout triggering the admin check, you'll need to modify the conditional logic in the script. Here’s an explanation of how to adjust or bypass the check: - User
no, i dont need change code, i want such 'setup' value that will not trigger check and get web_key
- Assistant
If you want to retrieve the
web_keywithout entering the block that checks for an admin session, but without changing the code, you're essentially looking for a way to exploit the existing logic. Based on the current script, the only way to bypass the admin check forweb_keyis not feasible, as$_POST["setup"]directly tied toweb_keywill always lead to the session check.However, if you are exploring legitimate possibilities within existing code, consider these options:
-
Misuse of Existing Logic: If the logic elsewhere in the application mistakenly returns the
web_keyfor a different value of$_POST["setup"]that does not trigger an admin check, then you may exploit that. However, this would likely be a logical flaw or oversight, not something intentionally left open. -
: Depending on how is structured, observe if there are intermediary paths to get with different keys.
-
- User
- Assistant
To align the JavaScript code with the PHP logic provided, you need to ensure that the parameters sent in the
FormDataobject match what your PHP script expects. Based on the PHP code you provided, theavatarsfunction requiresfunctionto be set to'avatars'anddatato be an array of Steam IDs. Here’s how you can modify your JavaScript code to interact with the PHP script correctly:- Set the
functionto .
- Set the