Comments (16)
enc 可能在网页的 query 中。Products is not found 可能是你的 usertype 或者登录地址不正确,有的学校宿舍网络和免费教育网络认证地址不一样,混用就会出现 Products is not found
from bitsrunlogingo.
如果哪里都找不到 enc 的话,我建议你将其置为空字符串
from bitsrunlogingo.
如果哪里都找不到 enc 的话,我建议你将其置为空字符串
info 参数前面几个字符是 SRBX1 ,应该是对应 enc 参数的 srun_bx1 ?
from bitsrunlogingo.
程序中是固定的 SRBX1,我目前没见过有别的值,所以不清楚这个前缀具体意味着什么
from bitsrunlogingo.
如果哪里都找不到 enc 的话,我建议你将其置为空字符串
尝试了把 enc 参数设置为空字符串,依旧是错误信息 E2806: Products is not found (39).
另外就是注意到登录成功后 rad_user_info 里包含了 product 相关信息,不知道是否有用
![image](https://private-user-images.githubusercontent.com/57244337/286985033-048adc0c-b52e-4d72-ae8a-52f213021700.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTE1OTAsIm5iZiI6MTcyMzg1MTI5MCwicGF0aCI6Ii81NzI0NDMzNy8yODY5ODUwMzMtMDQ4YWRjMGMtYjUyZS00ZDcyLWFlOGEtNTJmMjEzMDIxNzAwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE2VDIzMzQ1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUzYmY2ZjUwYWRhMTlmOTUxMDAyOGI4YmU2ZjlhNDMwMGU3NDc4NWQ5NGFiOTQ2OWZjMzdjYzk0MzMwMDc0YWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.QaBZ7tqAHOkegrw2cxe9mWJ58wdJnbecTaQRXlBaUyA)
from bitsrunlogingo.
从你给的图片中的信息可以看出 usertype 的值是正确的,但是无法判断登录失败的原因。新的 release 1.4.5 中添加了 4 个新的可配置字段,我不确定这是否能解决你的问题,但你可以试试调整他们
from bitsrunlogingo.
我发现我不小心忽略了控制台的截图,你的配置确实没有问题。要找出问题在哪需要一些深入的研究
from bitsrunlogingo.
从你给的图片中的信息可以看出 usertype 的值是正确的,但是无法判断登录失败的原因。新的 release 1.4.5 中添加了 4 个新的可配置字段,我不确定这是否能解决你的问题,但你可以试试调整他们
试了一下 release 1.4.5 ,enc 参数无论是默认值还是空值依旧是相同的错误 E2806: Products is not found (39).
Condig.yaml
![image](https://private-user-images.githubusercontent.com/57244337/287123365-1e17503f-ad78-4446-be12-1815cb55c2cd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTE1OTAsIm5iZiI6MTcyMzg1MTI5MCwicGF0aCI6Ii81NzI0NDMzNy8yODcxMjMzNjUtMWUxNzUwM2YtYWQ3OC00NDQ2LWJlMTItMTgxNWNiNTVjMmNkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE2VDIzMzQ1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFkZGE4ODQ0NWUyNzdiNzg0YWE5ZjQyNjk5MWJkZTZhNzQxMjhjYTBlNzcyMDZlMDhmMGQwMmNiODk1ZGU5YmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.uGbtTFi04iyLlheqQ0poRCNWxgI5-PC3bQcId6z1dfw)
log
2023-12-01 09:56:05 [INFO] 正在获取登录状态
2023-12-01 09:56:05 [DEBU] HTTP GET http://172.16.245.50/cgi-bin/rad_user_info
2023-12-01 09:56:05 [DEBU] jQuery1701395765127808000({"client_ip":"10.30.49.213","ecode":0,"error":"not_online_error","error_msg":"","online_ip":"10.30.49.213","res":"not_online_error","srun_ver":"SRunCGIAuthIntfSvr V1.18 B20211028","st":1701395765})
2023-12-01 09:56:05 [DEBU] 认证客户端 ip: 10.30.49.213
2023-12-01 09:56:05 [INFO] 检测到用户未登录,开始尝试登录...
2023-12-01 09:56:05 [DEBU] 正在获取 Token
2023-12-01 09:56:05 [DEBU] HTTP GET http://172.16.245.50/cgi-bin/get_challenge
2023-12-01 09:56:05 [DEBU] jQuery1701395765143987000({"challenge":"fc2d515883d0ab14e00eea07f3a358f27b76b2679aec72f14f32f20f21f74341","client_ip":"10.30.49.213","ecode":0,"error":"ok","error_msg":"","expire":"35","online_ip":"10.30.49.213","res":"ok","srun_ver":"SRunCGIAuthIntfSvr V1.18 B20211028","st":1701395765})
2023-12-01 09:56:05 [DEBU] token: fc2d515883d0ab14e00eea07f3a358f27b76b2679aec72f14f32f20f21f74341
2023-12-01 09:56:05 [DEBU] 发送登录请求
2023-12-01 09:56:05 [DEBU] HTTP GET http://172.16.245.50/cgi-bin/srun_portal
2023-12-01 09:56:05 [DEBU] jQuery1701395765150509000({"client_ip":"10.30.49.213","ecode":"E2806","error":"login_error","error_msg":"E2806: Products is not found (39).","online_ip":"10.30.49.213","res":"login_error","srun_ver":"SRunCGIAuthIntfSvr V1.18 B20211028","st":1701395765})
2023-12-01 09:56:05 [ERRO] 登录出错: login_error
以下是网页实现登陆逻辑的相关 js 文件,不知道是否有帮助。在此还是非常感谢 Mmx233 的帮助
jquery.srun.portal.js: https://pastebin.ubuntu.com/p/FRgz4N8Mwq/
main.js: https://pastebin.ubuntu.com/p/89vws8rYSv/
from bitsrunlogingo.
我对比了你的 jquery.srun.portal.js
,除了多了一段 OAuth 以及一些显示方面的区别之外没有差异
你在正常登录时有对路径 /v1/srun_portal_oauth
的请求吗
/**
* oauth2 协议登录
* Url:/v1/srun_portal_oauth
*/
function oauth(url, params, callback) {
$.get(autoBuildUrl(url) + "/v1/srun_portal_oauth" + params, callback);
}
/**
* oauth Auth
*/
$.OAuth = function (url, data, callback) {
var urlParams = location.search;
var ssoCallback = function (response) {
if (response.Code === 200) {
return callback({
error: 200,
message: "OK",
ac_id: response.ID
});
} else if (response.Code === 301) {
location.href = response.Redirect
}
var message = error(0, response.Message);
return callback({
error: "fail",
code: response.Code,
redirect: response.Redirect,
message: message
});
};
oauth(url, urlParams, ssoCallback)
};
/**
* double auth
* Url: /v1/srun_portal_double
*/
function ddiDoubleAuth(url, params, callback) {
$.get(autoBuildUrl(url) + "/v1/srun_portal_double" + params, callback);
}
$.DdiDoubleAuth = function (url, callback) {
var ddiCallback = function (response) {
return callback({
code: response.code,
message: response.message
})
};
ddiDoubleAuth(url, location.search, ddiCallback)
};
from bitsrunlogingo.
根据你的 jquery.srun.portal.js
,你的 enc 是 srun_bx1
,enc 会影响 info 字段的编码结果
var enc = "s" + "run" + "_bx1", n = 200, type = 1;
from bitsrunlogingo.
我对比了你的
jquery.srun.portal.js
,除了多了一段 OAuth 以及一些显示方面的区别之外没有差异你在正常登录时有对路径
/v1/srun_portal_oauth
的请求吗
没有对 /v1/srun_portal_oauth
的请求
![image](https://private-user-images.githubusercontent.com/57244337/287144399-2b440e86-ac60-4338-b2aa-c540bb15ec15.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4NTE1OTAsIm5iZiI6MTcyMzg1MTI5MCwicGF0aCI6Ii81NzI0NDMzNy8yODcxNDQzOTktMmI0NDBlODYtYWM2MC00MzM4LWIyYWEtYzU0MGJiMTVlYzE1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE2VDIzMzQ1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5Njk5YTE2NDI0N2UyMjVkODU2ZTA5NjdjMWZjNDM3MDkzMjExMDVjMjhkYmRlYzIxZGJkZmUxZDYxMDE5Y2QmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hZKkbUfvyXt4c6cc7fhFhksFRvUk7kw6KsLt92yYwvw)
from bitsrunlogingo.
这样的话 srun_portal 的逻辑和表单是完全一致的,那问题是不是出在 get_challenge 这边呢,这个请求的表单是不是 callback
username
ip
和 _
from bitsrunlogingo.
这样的话 srun_portal 的逻辑和表单是完全一致的,那问题是不是出在 get_challenge 这边呢,这个请求的表单是不是
callback
username
ip
和_
是的,如图
from bitsrunlogingo.
我找到问题了,示例配置文件和实际配置文件不一致,你需要将 userType 的 T 大写或者使用程序自动自动生成的配置文件填写配置
from bitsrunlogingo.
新的 release 中修正这个字段为 user_type
并修复了一个 bug
from bitsrunlogingo.
可以成功登陆了,感谢作者 Mmx233 帮助排查问题,配置如图,坐标 SWPU
from bitsrunlogingo.
Related Issues (20)
- 多个网口使用同一个IP请求 HOT 10
- 多网卡模式设置问题 HOT 2
- 运行出错,状态异常: login_error HOT 2
- 双拨问题 HOT 29
- Pull Request 预请求 HOT 21
- 报错 HOT 1
- 请问后台挂起和进程守护是怎么实现的呢? HOT 3
- 多线多号多拨问题 HOT 7
- 请问ac_id能否自动获取 HOT 8
- 编译报错:invalid go version HOT 4
- 不能follow重定向 HOT 3
- 作者有考虑加入ipv6支持吗 HOT 3
- luci 应用崩溃 HOT 1
- 被Windows报毒了 HOT 1
- rr_code=2,不知道为啥输入的网址在运行后会多加/cgi-bin/srun_portal ,用浏览器进入http://172.31.252.106/cgi-bin/rad_user_info 也是空的,不知道是不是程序给网址加了这一段导致的 HOT 11
- 守护模式检测失败后不会尝试重新链接吗?为什么只是打印错误信息了 HOT 1
- 连接报错Nas Type Not Found HOT 6
- 脚本登录上了但上不了网 HOT 3
- 登陆出错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitsrunlogingo.