第一题

查看源代码就阔以了
第二题

Burpsuite抓包观察
显然是要POST这个算式的值
那有两秒时间,其实手速快直接复制丢python eval() 再复制过去是最快最简单的办法
不过也可以写个小脚本,毕竟时间要是很短就不能用这种骚操作了
import requests
from bs4 import BeautifulSoup
import re
from copyheaders import headers_raw_to_dict
headers_raw=b"""
Host: lab1.xseclab.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Referer: http://hackinglab.cn/ShowQues.php?type=scripts
Cookie: PHPSESSID=f1c89a3feb5ae8ec2cd76aacc033adc9
Connection: close
Upgrade-Insecure-Requests: 1
"""
header=headers_raw_to_dict(headers_raw)
url="http://lab1.xseclab.com/xss2_0d557e6d2a4ac08b749b61473a075be1/index.php"
response=requests.get(url,headers=header)
soup=BeautifulSoup(response.text,'html.parser')
text=soup.find('form').text
pattern="(\d.*?)="
result=eval(re.findall(pattern,text,re.S)[0].split(" ")[-1])
data={'v':result}
response=requests.post(url,data=data,headers=header)
print(response.text)
第三题
空就是null 直接提交
第四题

观察源代码 显然我们是要把a的函数内容执行得到d

d的前14位便是我们的key

通过正则匹配获得我们的key
第五题

把验证码填了 Burpsuite抓包
我们知道密码是首位非零的四位数 就用python写个字典1000~9999
把POST的包丢intruder跑字典
然后看长度不一样的包
response里就是我们要的结果
网友评论