0
http://admin:[email protected]/videostream.cgi

To access a url that doesn't require http authenticate it's quite easy:

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

But how to specify admin:123456?

2 Answers 2

1

See the RFC or This Wikipedia article.

It can be educational to use Wireshark, or some other LAN sniffer, to watch what a browser and server do when you access a URL with embedded credentials such as your http://admin:[email protected]/videostream.cgi

Sign up to request clarification or add additional context in comments.

2 Comments

Is it possible to save the video stream into a file by command line?
As Wyatt Anderson says, there are tools like curl that are useful for this sort of thing. I mostly use wget which is similar to curl. For example wget http://admin:[email protected]/videostream.cgi or wget --http-user admin --http-password 123456 http://192.168.1.178/videostream.cgi.
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.

5 Comments

Is it possible to save the video stream into a file by command line?
You might try just using curl: curl -O -u USERNAME:PASSWORD url would save the output to a file. Check out the manpage for curl for the complete list of options.
No curl,only telnet is allowed.BTW,I tried to use curl to deal with stream before,but seems not working,it can only deal with simple resources but not continuous streams.
Hmm. Tricky. So you can only use telnet to do this? Are you on Linux or Windows? You could try redirecting the output of telnet to a file. It looks like this guy has some advice for saving MP3 streams with curl... but if you're really only restricted to using telnet you might have a harder time.
From a firewall point of view, using curl (or wget) is indistinguishable from using telnet to port 80. I would use Wireshark to see how the service at your URL is streaming data. Perhaps it serves up HTML with some embedded links to other object URLs that do the streaming?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.