-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrepost.py
29 lines (22 loc) · 827 Bytes
/
repost.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import hackhttp
import re
from setting import PATTERN
hh = hackhttp.hackhttp(hackhttp.httpconpool(500))
file = open('log/127.0.0.1.txt').read()
logs = file.split('------------------------------------------------------------------------------')
for log in logs:
try:
(time,raws) = log.split('***********')
raws = raws.strip()
time = time.strip().split()[1].strip()
# print time
if time > '14:54:00' and time < '14:55:00':
uri = re.findall('[POST|GET]\s(\S*)\sHTTP',raws)[0]
_, _, html, _, log = hh.http('http://127.0.0.1'+uri, raw = raws, headers={"Local": "1"})
#true paylaod or not
# if 'flag' in html:
print log['request']
print '-'*100
except Exception:
print log
pass