wechall writeup:Programming 1

题目:

When you visit this link you receive a message.
Submit the same message back to http://www.wechall.net/challenge/training/programming1/index.php?answer=the_message
Your timelimit is 1.337 seconds

解题:

时间限制为1.337 ,于是写python脚本实现自动提交。

先从浏览器获取自己的cookie,执行脚本,过关。

python 3.6.1  下载地址:https://www.python.org/getit/

以下代码只适合python3.0及以上版本

import urllib.request
import http.cookiejar
import webbrowser

url1='http://www.wechall.net/challenge/training/programming1/index.php?action=request'
url2='http://www.wechall.net/challenge/training/programming1/index.php?answer='
header={}

req =urllib.request.Request(url1,headers=header)
req.add_header('cookie','your cookie')
text=urllib.request.urlopen(req).read().decode('utf-8')
print(text)

url2=url2+text
webbrowser.open(url2)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值