如果你的页面访问入口是这种类型:xxxx.php?cGFnZWlkPTEmtLS9qMjLPWFkbWluJmFjdGlvbj1pbml0X2RlZmF1bHQ=那么需要进行_GET变更的解析,下面是两个函数,一种是判断是否是BASE64加密函数,一种是对其进行解析的函数
xxxx.php?cGFnZWlkPTEmtLS9qMjLPWFkbWluJmFjdGlvbj1pbml0X2RlZmF1bHQ=这咱例子的生成是使用这样的写法:
xxxx.php?".base64_encode("ID=33&action=init")."
使用本函数,会得到ID和action的值
PHP代码
//判断GET变量是否为BASE64编码,不是很科学,需要进一步改进此函数 function isBase64() { global $_SERVER; $QUERY_STRING = $_SERVER['QUERY_STRING']; $Code = base64_decode($QUERY_STRING);//print base64_decode($Code); $Array = explode('=',$Code); if(sizeof($Array)>1) { return 1; } else return 0; } //重置_GET变量 function CheckBase64() { global $_GET,$_SERVER; $QUERY_STRING = $_SERVER['QUERY_STRING']; $QUERY_STRING_ARRAY = explode('&',$QUERY_STRING); $QUERY_STRING = $QUERY_STRING_ARRAY[0]; $QUERY_STRING = base64_decode($QUERY_STRING); $Array = explode('&',$QUERY_STRING); $_GET = array(); //形成新的_GET变量信息 $NewArray = array(); for($i=0;$i<sizeof($Array);$i++) { if($Array[$i]!="") { $ElementArray = explode('=',$Array[$i]); $_GET[(String)$ElementArray[0]] = $ElementArray[1]; $NewArray[$i] = $ElementArray[0]."=".$ElementArray[1]; } } //附加GET变量形成部分 for($i=1;$i<sizeof($QUERY_STRING_ARRAY);$i++) { if($QUERY_STRING_ARRAY[$i]!="") { $ElementArray = explode('=',$QUERY_STRING_ARRAY[$i]); $_GET[(String)$ElementArray[0]] = $ElementArray[1]; $NewArray[$i] = $ElementArray[0]."=".$ElementArray[1]; } } //形成新的_SERVER变量信息 $_SERVER['QUERY_STRING'] = join('&',$NewArray); $_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; }

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.