|
需求:
模拟登陆系统,
第一步:GET请求,登陆url,获取sessionid和token
第二步:post请求,cookie为获取到的session和token,body为用户名和密码信息。
问题:第二步报404错误,cookie添加失败。求助大神我的问题出在哪里?
我得代码:
web_custom_request("login.html",
"URL=https://{ip}:4430/dashboard/auth/login/",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=https://{ip}:4430/dashboard/auth/login/",
"Snapshot=",
"Mode=html",
"EncType=text/plain; charset=UTF-8",
// "body={username=\"{user}\"&password=c2RnZmFzZGc%3D&csrfmiddlewaretoken=\"{csrftoken_1}\"}",
LAST);
web_add_cookie(cookie);
return 0;
错误信息:
Action.c(14): Continuing after Error -26627: HTTP Status-Code=404 (Not Found) for "https://199.201.90.31:4430/dashboard/auth/login/" [MsgId: MERR-26627]
Action.c(14): HANDLE_CLOSING" on behalf of "URL="https://199.201.90.31:4430/dashboard/auth/login/" [MsgId: MMSG-27397]
Action.c(14): web_custom_request("login.html") highest severity level was "continue on error", 21 body bytes, 65 header bytes [MsgId: MMSG-26388]
Action.c(14): Continuing after error in Vuser script.
Action.c(25): web_add_cookie started [MsgId: MMSG-26355]
Action.c(25): Continuing after Error -27234: Adding the cookie failed [MsgId: MERR-27234]
Action.c(25): web_add_cookie highest severity level was "continue on error" [MsgId: MMSG-26391]
Action.c(25): Continuing after error in Vuser script.
|
|