Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 





Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Alternative Computing > Other Browsers
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Other Browsers all other browser support forum

Reply
 
Thread Tools
Old 04-29-2008, 01:00 AM   #1 (permalink)
Registered User
 
Join Date: Apr 2008
Posts: 1
OS: XP & Ubuntu


Authentication problem calling Lynx from ASP script

I'm trying to retrieve data from an embedded web server. (It's actually a MicroLogix 1100 industrial PLC.) The embedded server seems to only authenticate properly with Internet Explorer. I want to query the server with an ASP script and parse the result so I'm trying to use Lynx (the Windows version of the text only browser) to make the query and give back the result. According to the Lynx manual I should be able to pass the authorisation parameters like so:

Code:
lynx -dump -auth=username:password http://ipaddress/dataview?offset=30&format=4
where
-dump tells Lynx to dump the output and terminate (rather than open up the browser),
-auth=username:password is the authorisation string,
http:... is the page and parameters I'm trying to retrieve.

Here's what IE sends to the server on page reloads after the first authorization (and it gets the desired response).
Code:
GET /dataview.dat?offset=30&format=4 HTTP/1.0
Accept: */*
Accept-Language: en-gb
Pragma: no-cache
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; MS-RTC LM 8)
Host: 10.62.112.176
Authorization: Digest username="administrator", realm="1763-L16BWA B/5.00", qop="auth", algorithm="MD5", uri="/dataview.dat", nonce="a4b8c8d7e0f6a7b2c3d2e4f5a4b7c5d2e7f", nc=00000002, cnonce="e9030a7ee879a901f5ed6a6f3f2e1719", response="27f77336cfc0b56724cc32122c53accb"
Here's my Lynx attempt:
Code:
C:\Lynx>lynx -dump -auth=administrator:ml1100 http://123.123.123.123/dataview.dat

Looking up 123.123.123.123
Making HTTP connection to 123.123.123.123
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Can't retry with authorization!  Contact the server's WebMaster.
Can't Access `http://123.123.123.123/dataview.dat'
Alert!: Unable to access document.

lynx: Can't access startfile
Has anyone any ideas how to replicate the IE authentication in Lynx?

Alternately - and maybe even better - is there a way to do this within ASP - preferably with some distributable code.
Transistor is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 07:23 AM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81