Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.git
.dockerignore
Dockerfile
src/
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM php:7.4-apache

RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
WORKDIR /var/www/html

COPY . .
RUN chmod 777 -R ./
RUN echo "\nDirectoryIndex index.php" >> .htaccess
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,19 @@ define('MAIL_RECV', '[email protected]');//接收通知的邮件地址
* 安装脚本完全参考[wordpress](https://cn.wordpress.org/)的安装程序
* **Warning: 本工具仅允许使用在CTF比赛等学习、研究场景,严禁用于非法用途**

## 构建Docker镜像
### build
```bash
sudo docker build -t="your_dockerhub_account/bluelotus_xssreceiver" .
```

### run
```bash
sudo docker run -d -p 8080:80 --name xssr your_dockerhub_account/bluelotus_xssreceiver
```
* 运行成功后,访问http://网站地址:8080/


## 意见与建议

欢迎大家在使用过程中提出各种宝贵的意见和建议,以及各种bug,不胜感激
Expand Down
3 changes: 2 additions & 1 deletion api.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

$referer_array = parse_url($_SERVER['HTTP_REFERER']);
//CSRF防御
if($referer_array['host'] != $_SERVER['HTTP_HOST']) {
//$_SERVER['HTTP_HOST']有可能包含端口号,比如:abc.com:8080。需要先去除端口号再比较。
if($referer_array['host'] != preg_replace("/:\d+$/", '', $_SERVER['HTTP_HOST'])) {
exit('Access Denied');
}

Expand Down