Re: tcpconnect - username/password

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 63014
interpreted = N
texte = Interarchy can do this (and almost nearly everything else but making coffee = :-)) >Thanks Christer, I'm sure your code will work, but I didn't use it yet, >although I will some day. > >I finally found a software (Eavesdrop) that gives me the same data that >OTSessionWatcher used to give me on MacOS9, but Eavesdrop runs on OS X. > So now (finally) I once again have a tool that displays the exact >ASCII data that's sent via HTTP. > >I just started the Eavesdrop software listening, then I requested my >page that requires the username and password, which made the browser >open its authentication dialog box. I entered the proper username and >password and received the requested page, then I just found the ASCII >text for that post in Eavesdrop and copy/pasted it into my tcpconnect >page -- including that "Authorization: Basic" line with its already >encrypted value -- and it worked like a charm! > >If you're running OS X and need a tool that listens to network traffic >and shows you what's being sent and received, Eavesdrop might be worth >a look, it's on versiontracker.com and probably lots of other shareware >/ download sites. It certainly makes writing the proper tcpconnect / >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 >> method=3DBase64]Username:Password[/Encrypt] >> [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 >> >> 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/ -- ************************************************************* 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 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)
Interarchy can do this (and almost nearly everything else but making coffee = :-)) >Thanks Christer, I'm sure your code will work, but I didn't use it yet, >although I will some day. > >I finally found a software (Eavesdrop) that gives me the same data that >OTSessionWatcher used to give me on MacOS9, but Eavesdrop runs on OS X. > So now (finally) I once again have a tool that displays the exact >ASCII data that's sent via HTTP. > >I just started the Eavesdrop software listening, then I requested my >page that requires the username and password, which made the browser >open its authentication dialog box. I entered the proper username and >password and received the requested page, then I just found the ASCII >text for that post in Eavesdrop and copy/pasted it into my tcpconnect >page -- including that "Authorization: Basic" line with its already >encrypted value -- and it worked like a charm! > >If you're running OS X and need a tool that listens to network traffic >and shows you what's being sent and received, Eavesdrop might be worth >a look, it's on versiontracker.com and probably lots of other shareware >/ download sites. It certainly makes writing the proper tcpconnect / >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 >> method=3DBase64]Username:Password[/Encrypt] >> [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 >> >> 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/ -- ************************************************************* 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Christer Olsson

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:

[OT] Retrieve old DNS data? (2007) WebCat2 several catalogs? (1997) [Sum] function? (1997) RE: Missing contexts on NT (1997) [OT] Bit of New Zealand Fun (2004) Need relative path explanation (1997) [searchString] (1997) Hideif on IP range (2004) database size? (1997) Extended [ConvertChars] (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) Running _every_ page through WebCat-error.html (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) tcpconnect/tcpsend frustrations (2002) if else problem (2003) Re:2nd WebCatalog2 Feature Request (1996) How to Display text in empty fields (1997) shipCost not working v2.1b4 (1997) Multiple prices (1997) Adding Multiple Items (1999)