0
http://admin:123456@192.168.1.178/videostream.cgi

要访问不需要 http 身份验证的 url,这很容易:

telnet 192.168.1.178 80
Get /videostream.cgi HTTP/1.1
Accept: text/html;text/plain

User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.13) Gecko/20100914 Firefox/3.5.13
Connection: close

但如何指定admin:123456

4

2 回答 2

1

请参阅RFC此 Wikipedia 文章

使用Wireshark或其他一些 LAN 嗅探器来观察浏览器和服务器在您访问具有嵌入式凭据(例如http://admin:123456@192.168.1.178/videostream.cgi )的 URL 时会执行哪些操作可能具有教育意义

于 2010-10-28T13:15:33.533 回答
1

For basic authentication, you specify the username and password as username:password, then Base64-encode it and use it as an argument to the Authentication header:

Authorization: Basic YXNkZjoxMjM0

YXNkZjoxMjM0 decodes to asdf:1234; I used curl -u adsf:1234 (specifying the username "asdf" and password "1234") to produce this result.

于 2010-10-28T13:18:01.120 回答