-
- include_once 'include/Base.php';
- $path = '';
- $url = isBase::decrypt(urlDecode($_SERVER['QUERY_STRING']));
- parse_str($ url); //Get the variable passed through url address GET
- if(!empty($_POST['path'])){ //Get the variable passed by POST
- $path = $_POST['path'];
- $path = isBase::decrypt(urlDecode($path));
- }
- //Resolve the real path
- if(empty($path)){
- //header("Location: login.php");
- exit ;
- }
- if(!preg_match("/(^http://)|([?|&|=])/",$path)){
- //Jump to the path of the actual executed file
- chdir(dirname ($path));
- include_once basename($path);
- exit;
- }
- ?>
Copy code
index.php is in the same directory as include.inc
2. Modify the link in the program ()
-
- "index.php?".encrypt("path=/test/test.php&test=123&test2=4321")
Copy the code
3. Modify the POST form in the program
Forms are submitted to index.php
Add a hidden form in the middle
4. Modify the path of the front-end Html page
baseref=/test
5. Friends, please write the encryption and decryption functions yourself.
|