打开网页点击about
:
看到有提示git
那这个题就先从git源码泄露入手把。
在URL后加入.git/
进入:
在linux中使用GitHacker
脚本
下载方法:
pip install requests #安装需要的第三方库,如果已安装请忽略!
git clone https://github.com/wangyihang/GitHacker.git
python2 GitHacker.py http://111.200.241.244:38019/.git/ #后面的url可以换成自己想扫的网站,这里用的是题目的url
得到源码:
查看index.php
:
<?php
if (isset($_GET['page'])) {
$page = $_GET['page'];
} else {
$page = "home";
}
$file = "templates/" . $page . ".php";
// I heard '..' is dangerous!
assert("strpos('$file', '..') === false") or die("Detected hacking attempt!");
// TODO: Make this look nice
assert("file_exists('$file')") or die("That file doesn't exist!");
?>
<!DOCTYPE html>
<html></