【超星学习痛】逆向登录分析 滑块验证码

在这里插入图片描述

1.获取服务器返回时间

https://captcha.chaoxing.com/captcha/get/conf

在这里插入图片描述

2.获取验证码

https://captcha.chaoxing.com/captcha/get/verification/image
在这里插入图片描述

2.1 分析参数

直接搜captchaKey
在这里插入图片描述

// 核心代码
var _0x5876dc = _0x2e675c
, _0x422ded = _0x4c771b(_0x4e0309 + _0x11dbad())
, _0x4e0309 = _0x4c771b(_0x4e0309 + _0x3fedba + _0x589b78 + _0x422ded) + ':' + (parseInt(_0x4e0309) + 0x493e0) || ''
, _0x3aca1f = _0x46cf2d(_0x36bc0c, _0x3831d5, _0x4015b8[_0x5876dc(0x24d)][_0x5876dc(0x38b)]);
_0x4015b8['IMAGE_VERIFY_TAG'] = _0x4c771b(_0x3fedba + _0x589b78 + Date[_0x5876dc(0x3d5)]() + _0x11dbad()),
var _0x5876dc = _0x2e675c
, captchaKey = MD5加密(服务器返回时间 + 随机UUID)
, token = MD5加密(服务器返回时间 + captchaId + 'slide' + captchaKey) + ':' + (parseInt(服务器返回时间) + 0x493e0) || ''
// , _0x3aca1f = _0x46cf2d(_0x36bc0c, _0x3831d5, _0x4015b8[_0x5876dc(0x24d)][_0x5876dc(0x38b)]);
iv = MD5加密(captchaId + 'slide' + 当前时间戳 + 随机UUID)

3.验证

https://captcha.chaoxing.com/captcha/check/verification/result
在这里插入图片描述
token是第二步返回的token
iv和第二步的iv一样

在这里插入图片描述

要模拟登录超星学习通,你需要先了解超星学习通的登录方式。超星学习通的登录方式有两种:账号密码登录和扫码登录。账号密码登录需要你模拟表单提交,扫码登录需要你模拟二维码的生成和扫描。 以下是账号密码登录的模拟登录步骤: 1.首先,引入requests库: ```python import requests ``` 2.获取登录页面的cookies和token: ```python login_url = 'https://passport2.chaoxing.com/login?fid=&newversion=true&refer=http://i.mooc.chaoxing.com' login_page = requests.get(login_url) cookies = login_page.cookies token = re.findall(r'name="lt" value="(.*?)"', login_page.text)[0] ``` 3.构造登录请求的表单数据: ```python data = { 'username': 'your_username', 'password': 'your_password', 'lt': token, 'rememberMe': 'false' } ``` 4.构造登录请求头: ```python headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3', 'Referer': 'https://passport2.chaoxing.com/login?fid=&newversion=true&refer=http://i.mooc.chaoxing.com', 'Host': 'passport2.chaoxing.com', 'Origin': 'https://passport2.chaoxing.com', } ``` 5.发送登录请求: ```python login_req = requests.post(login_url, data=data, headers=headers, cookies=cookies) ``` 6.检查登录是否成功: ```python if login_req.text.find('登录成功') != -1: print('登录成功') else: print('登录失败') ``` 以上就是模拟登录超星学习通的基本流程。但需要注意的是,登录页面的token可能会定期更换,需要根据实际情况进行调整。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值