Re: FW: Username and password in tcp connect/send

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39973
interpreted = N
texte = Marc M. wrote: > > I have a tcp connect/send which seems to work fine except for the page being > accessed is realm based username and password protected. How would I > incorporate my username and password into the tcp send? > > [text]post_data=myform name value pairs here[/text] > > [tcpconnect host=myhost.com] > [tcpsend]POST /.portweb?adminshow HTTP/1.0[UnURL]%0D%0A[/UnURL][!] > [/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT > 5.0)[UnURL]%0D%0A[/UnURL][!] > [/!]Content-type: application/x-www-form-urlencoded[UnURL]%0D%0A[/UnURL][!] > [/!]Content-length:[!] > [/!][CountChars][post_data][/CountChars][UnURL]%0D%0A[/UnURL][!] [/!]Authorization: Basic [encrypt method=Base64][username]:[password][/encrypt][UnURL]%0D%0A[/UnURL][!] > [/!][post_data][UnURL]%0D%0A[/UnURL][!] [/!][UnURL]%0D%0A[/UnURL][!] > [/!][/TCPSend] > [/tcpconnect] > > ------ End of Forwarded MessageNote that I made two changes. I added the Authorization: Basic line and I moved the double CR/LF to the end, after the [post_data]. The rules for HTTP requests are very specific: the request is terminated by two CR/LF pairs. The form post data must be followed by the two blank lines, not preceeded.Get yourself a copy of something like net.demon (Windows only) that allows you to see the actual HTTP request and response: http://www.netdemon.net/ HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. FW: Username and password in tcp connect/send (Marc M. 2001)
  2. Re: FW: Username and password in tcp connect/send (John Peacock 2001)
  3. FW: Username and password in tcp connect/send (Marc M. 2001)
Marc M. wrote: > > I have a tcp connect/send which seems to work fine except for the page being > accessed is realm based username and password protected. How would I > incorporate my username and password into the tcp send? > > [text]post_data=myform name value pairs here[/text] > > [tcpconnect host=myhost.com] > [tcpsend]POST /.portweb?adminshow HTTP/1.0[unurl]%0D%0A[/UnURL][!] > [/!]USER-AGENT: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT > 5.0)[unurl]%0D%0A[/UnURL][!] > [/!]Content-type: application/x-www-form-urlencoded[unurl]%0D%0A[/UnURL][!] > [/!]Content-length:[!] > [/!][countchars][post_data][/CountChars][unurl]%0D%0A[/UnURL][!] [/!]Authorization: Basic [encrypt method=Base64][username]:[password][/encrypt][unurl]%0D%0A[/UnURL][!] > [/!][post_data][unurl]%0D%0A[/UnURL][!] [/!][unurl]%0D%0A[/UnURL][!] > [/!][/TCPSend] > [/tcpconnect] > > ------ End of Forwarded MessageNote that I made two changes. I added the Authorization: Basic line and I moved the double CR/LF to the end, after the [post_data]. The rules for HTTP requests are very specific: the request is terminated by two CR/LF pairs. The form post data must be followed by the two blank lines, not preceeded.Get yourself a copy of something like net.demon (Windows only) that allows you to see the actual HTTP request and response: http://www.netdemon.net/ HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ John Peacock

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:

Layers,Dreamweaver and WebCat Code (2000) Big Databases (1997) Setting up the server (1997) Summary Searches (2000) [WebDNA] Open Source CMS (2012) [WebDNA] Installation for Linux Dummy.. (2013) question: writing files textb in webmerch (1997) [WebDNA] =?windows-1252?Q?Re=3A_=5BWebDNA=5D_=5BWebDNA=5D_=5Bthisurlplusg?= (2013) Date search - yes or no (1997) WebCat2b12 Mac.acgi--[searchstring] bug (1997) searchable list archive (1997) TCP Connect over SSL? (2000) Works! (1997) [WebDNA] Brian Harrington (2019) HomePage Caution (1997) Moment of Thanks (1997) New Web Site Developers Database (1996) A question about security (1998) Sendmail and textarea (1998) calculating tax rates, mail order solutions and version 2 (1997)