- Check the source code found
<!-- OK ,now you have to post the margin what you find -->
- Check the response of existing hair
flag: 6LeR55qE6L+Y5LiN6ZSZ77yM57uZ5L2gZmxhZ+WQpzogTWpZNE9USTU=
- Then write code crawled pages
''' @Modify Time @Author ------------ ------- http://123.206.87.240:8002/web6/ 2019/9/7 16:40 laoalo ''' import requests import base64 url='http://123.206.87.240:8002/web6/' response = requests.session() head = response.get(url=url).headers str1 = base64.b64decode(head['flag']) flag = base64.b64decode(repr(str1).split(':')[1]) # flag = base64.b64decode(head['flag']).decode('utf-8').split(':')[1] # print(flag) data = {'margin':flag} key = response.post(url=url,data=data).text print(key)
Remember a wrong wording:
- the reason
= base64.b64decode the flags (head [ ' flag ' ]) decode (. ' UTF-. 8 ' ) .split ( ' : ' ) [. 1] # to respond out of parsing the flag, the result is the STR. flag = base64.b64decode ( flags) # in the post, we also need to code, the original code missing this step
- the repr () function to convert the object in the form interpreter for reading. Return value: string Parameters: object
-
''' @Modify Time @Author ------------ ------- http://123.206.87.240:8002/web6/ 2019/9/7 16:40 laoalo ''' import requests import base64 url='http://123.206.87.240:8002/web6/' response = requests.session() head = response.get(url=url).headers # str1 = base64.b64decode(head['flag']) # # print("答案的:",repr(str1).split(':')[1],type(repr(str1).split(':')[1])) # print("我的:",base64.b64decode(head['flag']).decode('utf-8').split(':')[1]) # # flag = base64.b64decode(repr(str1).split(':')[1]) # print(flag) flags = base64.b64decode(head['flag']).decode('utf-8').split(':')[1] # 将flag从respond解析出来,结果是str. flag = base64.b64decode(flags) # 在post的时候也需要上传 print(flag) data = {'margin':flag} key = response.post(url=url,data=data).text print(key)