[英]Login script for https site
Is it possible to auto-login to a https
enabled site by clicking a link? 通过单击链接是否可以自动登录到启用
https
站点?
So far i have tried php
and powershell
with no success. 到目前为止,我已经尝试了
php
和powershell
,但均未成功。 Curl does not return anything, the page is just loading with no visible response. Curl不返回任何内容,该页面仅在加载时没有可见的响应。
In the good old Days the trick user:password@www.site.com
worked fine, but now with all the security updates in Explorer this is not allowed. 在过去的好日子里,欺骗
user:password@www.site.com
工作,但是现在在Explorer中所有安全更新都不允许这样做。
When accessing my site i get a popup window asking for username and password (looks like iexplorer is creating that popup) so login fields are not in the browser window. 访问我的网站时,我会看到一个弹出窗口,询问用户名和密码(看起来像iexplorer正在创建该弹出窗口),因此登录字段不在浏览器窗口中。
As i said i have tried curl, but how do i know the field names for username
and password
? 如我所说,我尝试过curl,但是我怎么知道
username
和password
的字段名呢? Do they have standard names? 他们有标准名称吗? The text in the popup is in Swedish, but it is an English site i am accessing.
弹出窗口中的文本为瑞典语,但这是我正在访问的英语站点。 Therefor i assume the fields have standard names.
因此,我认为这些字段具有标准名称。
Any ideas? 有任何想法吗? preferably an working example :)
最好是一个工作示例:)
You can pass the user/password of Basic Authorization using -u
parameter. 您可以使用
-u
参数传递基本授权的用户名/密码。 And for https
use the -k
for insecure connection. 对于
https
使用-k
进行不安全的连接。
curl -X POST -L -k
-u "username:password"
-d "id=10&name=alex"
"https://www.example.com/"
For other curl parameters check this curl manual . 有关其他卷曲参数,请参阅本卷曲手册 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.