Re: tcpconnect - username/password

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 63013
interpreted = N
texte = Thanks Christer, I'm sure your code will work, but I didn't use it yet,=20= although I will some day. I finally found a software (Eavesdrop) that gives me the same data that=20= OTSessionWatcher used to give me on MacOS9, but Eavesdrop runs on OS X.=20= So now (finally) I once again have a tool that displays the exact=20 ASCII data that's sent via HTTP. I just started the Eavesdrop software listening, then I requested my=20 page that requires the username and password, which made the browser=20 open its authentication dialog box. I entered the proper username and=20= password and received the requested page, then I just found the ASCII=20 text for that post in Eavesdrop and copy/pasted it into my tcpconnect=20 page -- including that "Authorization: Basic" line with its already=20 encrypted value -- and it worked like a charm! If you're running OS X and need a tool that listens to network traffic=20= and shows you what's being sent and received, Eavesdrop might be worth=20= a look, it's on versiontracker.com and probably lots of other shareware=20= / download sites. It certainly makes writing the proper tcpconnect /=20 tcpsend contexts easier ... :) Sincerely, Kenneth Grome www.kengrome.com On Sep 13, 2005, at 16:39, Christer Olsson wrote: >> How do I make tcpconnect send a username and password like the = browser >> does ... it so I can access a page that normally needs to be logged >> into via the browser's authentication dialog? In other words, what >> must I add to this code to make it work? >> >> [TCPConnect host=3D192.168.1.1&port=3D80] >> [tcpsend]GET /index.tpl HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend] >> [/TCPConnect] > > You need to add a "Authorization" HTTP header to your request: > > [TCPConnect host=3D192.168.1.1&port=3D80] > [tcpsend]GET /index.tpl HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl] > Authorization: Basic [Encrypt=20 > method=3DBase64]Username:Password[/Encrypt]=20 > [unurl]%0D%0A%0D%0A[/unurl][/tcpsend] > [/TCPConnect] > > (Change Username and Password to your actual values) > -- > > ************************************************************* > Christer Olsson PO Box 9160 Phone +46 40 25 85 85 > Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 > Kantyxegatan 5 Sweden http://www.ljusaideer.se > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to=20 > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: tcpconnect - username/password ( Christer Olsson 2005)
  2. Re: tcpconnect - username/password ( Kenneth Grome 2005)
  3. Re: tcpconnect - username/password ( Christer Olsson 2005)
  4. tcpconnect - username/password ( Kenneth Grome 2005)
Thanks Christer, I'm sure your code will work, but I didn't use it yet,=20= although I will some day. I finally found a software (Eavesdrop) that gives me the same data that=20= OTSessionWatcher used to give me on MacOS9, but Eavesdrop runs on OS X.=20= So now (finally) I once again have a tool that displays the exact=20 ASCII data that's sent via HTTP. I just started the Eavesdrop software listening, then I requested my=20 page that requires the username and password, which made the browser=20 open its authentication dialog box. I entered the proper username and=20= password and received the requested page, then I just found the ASCII=20 text for that post in Eavesdrop and copy/pasted it into my tcpconnect=20 page -- including that "Authorization: Basic" line with its already=20 encrypted value -- and it worked like a charm! If you're running OS X and need a tool that listens to network traffic=20= and shows you what's being sent and received, Eavesdrop might be worth=20= a look, it's on versiontracker.com and probably lots of other shareware=20= / download sites. It certainly makes writing the proper tcpconnect /=20 tcpsend contexts easier ... :) Sincerely, Kenneth Grome www.kengrome.com On Sep 13, 2005, at 16:39, Christer Olsson wrote: >> How do I make tcpconnect send a username and password like the = browser >> does ... it so I can access a page that normally needs to be logged >> into via the browser's authentication dialog? In other words, what >> must I add to this code to make it work? >> >> [TCPConnect host=3D192.168.1.1&port=3D80] >> [tcpsend]GET /index.tpl HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl][/tcpsend] >> [/TCPConnect] > > You need to add a "Authorization" HTTP header to your request: > > [TCPConnect host=3D192.168.1.1&port=3D80] > [tcpsend]GET /index.tpl HTTP/1.0[unurl]%0D%0A%0D%0A[/unurl] > Authorization: Basic [Encrypt=20 > method=3DBase64]Username:Password[/Encrypt]=20 > [unurl]%0D%0A%0D%0A[/unurl][/tcpsend] > [/TCPConnect] > > (Change Username and Password to your actual values) > -- > > ************************************************************* > Christer Olsson PO Box 9160 Phone +46 40 25 85 85 > Ljusa Id=E9er AB SE-200 39 Malmo Fax +46 40 25 85 89 > Kantyxegatan 5 Sweden http://www.ljusaideer.se > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to=20 > > Web Archive of this list is at: http://webdna.smithmicro.com/ > > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Protect vs Authenicate (1997) Filemaker Pro Template for Orders (1999) Separate SSL Server (1997) Date problems-more (1997) UPS Shipping Docs (Where To Go) (1999) switching users (1998) What is this error message? (2006) Creating results.... (2003) Database Updates (1997) Trigger Problems (2001) WebCatalog (1999) upgrading (1997) verify online (1997) serial number dishing (1997) addlineitems within formvariable loop (1998) Is there an alternative to emailer? (1999) RE: Can a database get stomped by simultaneous access? (1997) [WebDNA] Attack? (2015) Browser Resolution (1999) WebCatalog can't find database (1997)