Wednesday, March 19, 2003

How to do a HTTP request with authentication by hand:



  1. Let's say your user:pass is fred:supersecret
  2. /bin/echo -n "fred:supersecret" > /tmp/x
  3. uuencode -m /tmp/x /tmp/y
    You'll get:
    begin-base64 644 /tmp/y
    ZnJlZDpzdXBlcnNlY3JldA==
    ====
  4. Copy the ZnJIZ... string (including the == at the end) to your cut buffer. This is your uuencoded user:password.
  5. telnet ip.or.host 80
  6. Type in: GET /path/to/file.html HTTP/1.0
  7. Optionally type in: HOST: www.yourserver.com
  8. Type in: Authorization: BASIC ZnJlZDpzdXBlcnNlY3JldA==
  9. Type in: A Blank line
  10. You should get the output web page now.



<< Home

This page is powered by Blogger. Isn't yours?