<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Router Web Page Authentication in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1436106#M552425</link>
    <description>&lt;P&gt;Then I get the LabVIEW default header information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST / HTTP/1.1
User-Agent: National Instruments LabVIEW
Host: 192.168.0.1
Accept: */*
Content-Length: 36
Content-Type: application/x-www-form-urlencoded

POST /ajax_request?Endpassword=adminHTTP/1.0 501 Not Implemented
Content-type: text/html
Date: Tue, 17 Mar 2009 17:18:19 GMT
Connection: close&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The POST VI's block diagram is locked so I can't open it to see how these things are being appended, or to change the way they're being appended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"&gt;POST / HTTP/1.1&lt;BR /&gt;&lt;BR /&gt;User-Agent: National Instruments LabVIEW&lt;BR /&gt;&lt;BR /&gt;Host: 192.168.0.1&lt;BR /&gt;&lt;BR /&gt;Accept: */*&lt;BR /&gt;&lt;BR /&gt;Content-Length: 36&lt;BR /&gt;&lt;BR /&gt;Content-Type: application/x-www-form-urlencoded&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;POST /ajax_request?Endpassword=adminHTTP/1.0 501 Not Implemented&lt;BR /&gt;Content-type: text/html&lt;BR /&gt;&lt;BR /&gt;Date: Tue, 17 Mar 2009 17:18:19 GMT&lt;BR /&gt;&lt;BR /&gt;Connection: close&lt;/DIV&gt;</description>
    <pubDate>Tue, 01 Feb 2011 19:43:25 GMT</pubDate>
    <dc:creator>ChristopherS</dc:creator>
    <dc:date>2011-02-01T19:43:25Z</dc:date>
    <item>
      <title>Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1423676#M550138</link>
      <description>&lt;P&gt;Sorry to be bringing this up again, it looks like it's been addressed a few times in the last couple years, but I've read these multiple times and attempted to apply the lessons they teach and&amp;nbsp;have not had success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.ni.com/t5/LabVIEW/HTTP-Connection-with-Password/m-p/1146346#M504441" rel="nofollow" target="_blank"&gt;http://forums.ni.com/t5/LabVIEW/HTTP-Connection-with-Password/m-p/1146346#M504441&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.ni.com/t5/LabVIEW/Read-data-of-embedded-web-page/m-p/1243792#M525335" rel="nofollow" target="_blank"&gt;http://forums.ni.com/t5/LabVIEW/Read-data-of-embedded-web-page/m-p/1243792#M525335&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.ni.com/t5/LabVIEW/Use-LabVIEW-to-login-username-and-password-into-device-IP/m-p/651832#M300745" rel="nofollow" target="_blank"&gt;http://forums.ni.com/t5/LabVIEW/Use-LabVIEW-to-login-username-and-password-into-device-IP/m-p/651832#M300745&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and of course &lt;A href="http://en.wikipedia.org/wiki/Basic_access_authentication" rel="nofollow" target="_blank"&gt;http://en.wikipedia.org/wiki/Basic_access_authentication&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm trying to achieve here is use LabVIEW 2010 to rip text from multiple pages of a local router via WiFi, parse the text, and make decisions based on the values retrieved.&amp;nbsp; Unfortunately some of the information I need requires a password be entered (just a password, "admin") before being granted access to to the pages I want.&amp;nbsp; Pretty typical for routers though I think.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ripping the text and parsing the strings is not a problem (though it can be a drag), I'm having difficulty with logging in to the router&amp;nbsp;with LabVIEW.&amp;nbsp; As I said the password is "admin" and unfortunately I have to assume that the username is also "admin".&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the page I'm trying to get to after logging in: &lt;A href="http://192.168.0.1/user/advanset.html?sid=824643" rel="nofollow" target="_blank"&gt;http://192.168.0.1/user/advanset.html?sid=824643&lt;/A&gt;&amp;nbsp;(I'm not trying to post a link for anyone to click on, just&amp;nbsp;showing the URL)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So using MikeS81's WebPageAuthentication_LV85.vi (found here: &lt;A href="http://forums.ni.com/t5/LabVIEW/Read-data-of-embedded-web-page/m-p/1251826#M527035" rel="nofollow" target="_blank"&gt;http://forums.ni.com/t5/LabVIEW/Read-data-of-embedded-web-page/m-p/1251826#M527035&lt;/A&gt;) I can get the source html, but not the info from the page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Therefore I'm trying to use MikeS81's WebPageAuthentication_LV85.vi in conjunction with the Rip Web Text.vi (sorry, can't seem to find a link to it right now, but I did get it form the NI LabVIEW&amp;nbsp;forums).&amp;nbsp; When Rip Web Text is incorporated the browser returns &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"The website declined to show this webpage&lt;BR /&gt;&amp;nbsp;HTTP 403 &lt;BR /&gt;&amp;nbsp; Most likely causes:&lt;BR /&gt;This website requires you to log in."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know a whole lot about web pages or TCPIP or HTML but I'm assuming that "sid=" in the URL means I'm being granted temporary access via some kind unique ID that expires, a cookie or something.&amp;nbsp; The VI is attached to this post, please let me know if you have any thoughts on it.&amp;nbsp; I've changed the indicators to use the output I received as the default values (so you should be able to see what I've gotten back&amp;nbsp;in the VI).&amp;nbsp; It seems to me that I should be trying to rip the text before closing the TCP connection opened for authentication, if this is incorrect please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know it may seem that I'm Frankensteining some serious crap together here, hope this doesn't end up in the Rube Goldberg thread... but I'll understand if it does.&amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://ni.lithium.com/i/smilies/16x16_smiley-wink.gif" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, and have a great weekend.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2011 21:04:22 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1423676#M550138</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-01-21T21:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1426014#M550634</link>
      <description>&lt;P&gt;Hey Christopher,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried opening your VI but it has some kind of conversion subVI that I couldn't find.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A. Zaatari&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2011 00:50:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1426014#M550634</guid>
      <dc:creator>Z'atari</dc:creator>
      <dc:date>2011-01-25T00:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1428892#M551101</link>
      <description>&lt;P&gt;Thank you for responding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm sorry, it is missing&amp;nbsp;the convert to base 64 utility found here: &lt;A href="http://decibel.ni.com/content/docs/DOC-5544" rel="nofollow" target="_blank"&gt;http://decibel.ni.com/content/docs/DOC-5544&lt;/A&gt;.&amp;nbsp; I haven't quite gotten the hang of how to include the sub VIs when uploading.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've continued to work on this and have not had any luck.&amp;nbsp; I think I may have to use the HTTP or TCP pallete, which I've been trying to find an excuse to learn anyway.&amp;nbsp; Any thoughts or ideas would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2011 20:18:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1428892#M551101</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-01-26T20:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1428990#M551122</link>
      <description>&lt;P&gt;Could you save your code to 2009?&amp;nbsp; I'd be happy to look at it, but I don't have 2010.&amp;nbsp; It does sound like you have two separate pieces of code both establishing separate connections to the server - one that can authenticate, the other that can't authenticate but can get you the data you need - and there may not be a way to share the connection between them, in which case you'd need to take the relevant parts of one and add them to the other.&amp;nbsp; I do not think you want to use the TCP palette as that will involve you writing code to handle all the authentication yourself, and that may not be simple.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2011 21:33:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1428990#M551122</guid>
      <dc:creator>nathand</dc:creator>
      <dc:date>2011-01-26T21:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1430060#M551287</link>
      <description>&lt;P&gt;Christopher:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran across this page once, and if you have Firefox, it might be useful. It uses an extension to intercept the POST data and headers when submitting a form (which I assume is happening when you submit the password on the router).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a link to the article (please note that this is on a non-NI site, and this is in no way officially supported &lt;img id="robothappy" class="emoticon emoticon-robothappy" src="https://ni.lithium.com/i/smilies/16x16_robot-happy.gif" alt="Robot Happy" title="Robot Happy" /&gt;&amp;nbsp; )&lt;/P&gt;
&lt;P&gt;&lt;A href="http://ssscripting.wordpress.com/2009/03/17/how-to-submit-a-form-programmatically/" target="_blank" rel="nofollow"&gt;http://ssscripting.wordpress.com/2009/03/17/how-to-submit-a-form-programmatically/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps out a little...&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2011 15:54:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1430060#M551287</guid>
      <dc:creator>charris</dc:creator>
      <dc:date>2011-01-27T15:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1430110#M551297</link>
      <description>&lt;P&gt;Just a sidenote on Tamper Data: you can use it to compare the GET and POST headers to see if they differ at all. I suspect you can just feed the GET header back into the POST function. For formatting, just use whatever formatting the GET function returns for the header in LabVIEW.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The tricky part will be figuring out the POST data. If you post up a screen shot or capture from Tamper Data, hopefully we can figure out how to format the data input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Overall, I think the process will just be a matter of replicating the GET and POST steps that you capture and translating them to requests in LabVIEW.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2011 16:10:28 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1430110#M551297</guid>
      <dc:creator>charris</dc:creator>
      <dc:date>2011-01-27T16:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1430310#M551330</link>
      <description>&lt;P&gt;Attached is the tamper data output we talked about, there is a LOT of information there.&amp;nbsp; XML and RTF versions are attached here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first few entries are from google.com, I then navigated to the router's web page, then logged in, then logged out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to look closer at this.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2011 17:49:38 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1430310#M551330</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-01-27T17:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1430476#M551375</link>
      <description>&lt;P&gt;This should be the response from me logging in,&amp;nbsp;the cookie is populated &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;11:17:13.097[113ms][total 113ms] Status: 200[OK]

GET &lt;A href="http://192.168.0.1/images/adminloggedinbig.png" target="_blank" rel="nofollow"&gt;http://192.168.0.1/images/adminloggedinbig.png&lt;/A&gt; Load Flags[LOAD_NORMAL] Content Size[-1] Mime Type[image/png]

   Request Headers:

      Host[192.168.0.1]

      User-Agent[Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13]

      Accept[image/png,image/*;q=0.8,*/*;q=0.5]

      Accept-Language[en-us,en;q=0.5]

      Accept-Encoding[gzip,deflate]

      Accept-Charset[ISO-8859-1,utf-8;q=0.7,*;q=0.7]

      Keep-Alive[115]

      Connection[keep-alive]

      Referer[&lt;A href="http://192.168.0.1/style/style.css]" target="_blank" rel="nofollow"&gt;http://192.168.0.1/style/style.css]&lt;/A&gt;

      Cookie[ddddd=493002; dddddddd=493002; lct_remember_me=; mac_remember=; lct_psw=; checked=]

   Response Headers:

      Content-Type[image/png]

      Date[Tue, 17 Mar 2009 15:38:22 GMT]

      Connection[close]

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So is this the header information we want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;      Accept[image/png,image/*;q=0.8,*/*;q=0.5] 

      Accept-Language[en-us,en;q=0.5]

      Accept-Encoding[gzip,deflate]

      Accept-Charset[ISO-8859-1,utf-8;q=0.7,*;q=0.7]

      Keep-Alive[115]

      Connection[keep-alive]

      Referer[&lt;A href="http://192.168.0.1/style/style.css]" target="_blank" rel="nofollow"&gt;http://192.168.0.1/style/style.css]&lt;/A&gt;

      Cookie[ddddd=493002; dddddddd=493002; lct_remember_me=; mac_remember=; lct_psw=; checked=]
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2011 19:13:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1430476#M551375</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-01-27T19:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1431772#M551612</link>
      <description>&lt;P&gt;Using HTTP GET VI the header is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;HTTP/1.0 200 OK
Content-type: text/html
Date: Wed, 18 Mar 2009 13:45:53 GMT
Connection: close
Pragma: no-cache
Cache-Control: no-cache, max-age=0
Expires: -1&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The next step would be to retrieve the POST header, so I opened Wireshark and found&amp;nbsp;the POST entry from logging in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST /ajax_request ?Endpassword=admin HTTP/1.1&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And another from logging out:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST /ajax_session ?sid=logout HTTP/1.1&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So does this mean that the POST header in it's entirety is "HTTP/1.1"?&amp;nbsp; I also picked through the source code for the page and found that the username is in fact "â€œadminâ€" and it doesn't look there is any base64 conversion necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I use these lines with the HTTP GET VI though the body returned is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;501 Not Implemented&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;501 Not Implemented&amp;lt;/H1&amp;gt;
The requested method is not recognized by this server.
&amp;lt;/BODY&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which tells me something about the way I submitting the POST is incorrect.&amp;nbsp; I've attached the VI I'm working with now and really wish there were some LabVIEW examples for the HTTP pallette.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it seems like I'm learning this as I go... it's because I am.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2011 15:27:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1431772#M551612</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-01-28T15:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1434274#M552092</link>
      <description>&lt;P&gt;Christopher:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A couple of thoughts regarding your POST VI:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 501 error makes it sound like (and I'm just guessing here) we have a header parameter off. LabVIEW is probably just assuming a set of defaults or not even specifying the header, whereas your browser is probably turning around and re-using the headers it got from the GET requests.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it might be worth manually inserting the header data (you can get it from the tamperdata capture) line by line into the request (see screen shot).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's what looks like an/the important POST:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST &lt;A href="http://192.168.0.1/ajax_request?Endpassword=admin" target="_blank" rel="nofollow"&gt;http://192.168.0.1/ajax_request?Endpassword=admin&lt;/A&gt; Load Flags[LOAD_BYPASS_CACHE  LOAD_BACKGROUND  ] Content Size[-1] Mime Type[text/html]
   Request Headers:
      Host[192.168.0.1]
      User-Agent[Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13]
      Accept[*/*]
      Accept-Language[en-us,en;q=0.5]
      Accept-Encoding[gzip,deflate]
      Accept-Charset[ISO-8859-1,utf-8;q=0.7,*;q=0.7]
      Keep-Alive[115]
      Connection[keep-alive]
      X-Requested-With[XMLHttpRequest]
      Referer[&lt;A href="http://192.168.0.1/]" target="_blank" rel="nofollow"&gt;http://192.168.0.1/]&lt;/A&gt;
      Cookie[ddddd=; dddddddd=; lct_remember_me=; mac_remember=; lct_psw=; checked=]
      Pragma[no-cache]
      Cache-Control[no-cache]
      Content-Length[0]
   Response Headers:
      Content-Type[text/html]
      Date[Tue, 17 Mar 2009 15:38:22 GMT]
      Connection[close]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the beginning of how we'd put in the header data:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/34108i775827880F44D24A/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="insert_headers.png" title="insert_headers.png" align="center" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, in your VI, it looks like there's a space in the request data: &lt;STRONG&gt;/ajax_request ?Endpassword=admin.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Try changing it to &lt;STRONG&gt;/ajax_request?Endpassword=admin&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue may just be that space, so try that first...&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2011 18:40:09 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1434274#M552092</guid>
      <dc:creator>charris</dc:creator>
      <dc:date>2011-01-31T18:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1435650#M552346</link>
      <description>&lt;P&gt;See attachment, I've added all the header elements and removed the space as you directed.&amp;nbsp; The POST body returned&amp;nbsp;is still:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;501 Not Implemented&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;501 Not Implemented&amp;lt;/H1&amp;gt;
The requested method is not recognized by this server.
&amp;lt;/BODY&amp;gt;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll go back and look at the tamperdata again.&amp;nbsp; Thanks for the input.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2011 16:12:54 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1435650#M552346</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-02-01T16:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1435688#M552354</link>
      <description>&lt;P&gt;I see I was missing part of the POST, the full entry should be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST &lt;A href="http://192.168.0.1/ajax_request?Endpassword=admin" target="_blank" rel="nofollow"&gt;http://192.168.0.1/ajax_request?Endpassword=admin&lt;/A&gt; Load Flags[LOAD_BYPASS_CACHE  LOAD_BACKGROUND  ] Content Size[-1] Mime Type[text/html]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2011 16:29:27 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1435688#M552354</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-02-01T16:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1435974#M552392</link>
      <description>&lt;P&gt;In order to figure out what LabVIEW is submitting differently I used Wireshark to monitor a login attempt with my LabVIEW VI and again with Firefox, I removed the CR and NL to make it easier to compare.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Firefox login:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST /ajax_request?Endpassword=admin HTTP/1.1
Host: 192.168.0.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: &lt;A href="http://192.168.0.1/Cookie" rel="nofollow" target="_blank"&gt;http://192.168.0.1/
Cookie&lt;/A&gt;: lct_remember_me=; mac_remember=; lct_psw=; checked=
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 0

HTTP/1.0 200 OK
Content-type: text/html
Date: Tue, 17 Mar 2009 15:32:24 GMT
Connection: close&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LabVIEW VI login:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST / HTTP/1.1
Host: 192.168.0.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: &lt;A href="http://192.168.0.1/" target="_blank" rel="nofollow"&gt;http://192.168.0.1/&lt;/A&gt;
Cookie: ddddd=; dddddddd=; lct_remember_me=; mac_remember=; lct_psw=; checked=
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

POST /ajax_request?Endpassword=admin&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I see a couple things wrong:&lt;/P&gt;
&lt;P&gt;1. The LabVIEW POST VI is submitting the POST command AFTER the header in the LabVIEW POST, but Firefox submits it before.&lt;/P&gt;
&lt;P&gt;2. The LabVIEW POST VI is adding "Content-Type: application/x-www-form-urlencoded" to the header, I didn't put that in there.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2011 18:32:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1435974#M552392</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-02-01T18:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1436092#M552421</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;LabVIEW VI login:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST / HTTP/1.1
Host: 192.168.0.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: &lt;A rel="nofollow" href="http://192.168.0.1/" target="_blank"&gt;http://192.168.0.1/&lt;/A&gt;
Cookie: ddddd=; dddddddd=; lct_remember_me=; mac_remember=; lct_psw=; checked=
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

POST /ajax_request?Endpassword=admin&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I see a couple things wrong:&lt;/P&gt;
&lt;P&gt;1. The LabVIEW POST VI is submitting the POST command AFTER the header in the LabVIEW POST, but Firefox submits it before.&lt;/P&gt;
&lt;P&gt;2. The LabVIEW POST VI is adding "Content-Type: application/x-www-form-urlencoded" to the header, I didn't put that in there.&lt;/P&gt;
&lt;HR /&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure if the "Content-Type" header entry is affecting things or not, but I'm a bit suspicious of the beginning of the header. It's putting in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST / HTTP/1.1
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I think that's where the POST should be, but it's putting it at the end. What happens if you put the POST function before the headers in the VI?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Feb 2011 19:27:19 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1436092#M552421</guid>
      <dc:creator>charris</dc:creator>
      <dc:date>2011-02-01T19:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Router Web Page Authentication</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1436106#M552425</link>
      <description>&lt;P&gt;Then I get the LabVIEW default header information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;POST / HTTP/1.1
User-Agent: National Instruments LabVIEW
Host: 192.168.0.1
Accept: */*
Content-Length: 36
Content-Type: application/x-www-form-urlencoded

POST /ajax_request?Endpassword=adminHTTP/1.0 501 Not Implemented
Content-type: text/html
Date: Tue, 17 Mar 2009 17:18:19 GMT
Connection: close&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The POST VI's block diagram is locked so I can't open it to see how these things are being appended, or to change the way they're being appended.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"&gt;POST / HTTP/1.1&lt;BR /&gt;&lt;BR /&gt;User-Agent: National Instruments LabVIEW&lt;BR /&gt;&lt;BR /&gt;Host: 192.168.0.1&lt;BR /&gt;&lt;BR /&gt;Accept: */*&lt;BR /&gt;&lt;BR /&gt;Content-Length: 36&lt;BR /&gt;&lt;BR /&gt;Content-Type: application/x-www-form-urlencoded&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;POST /ajax_request?Endpassword=adminHTTP/1.0 501 Not Implemented&lt;BR /&gt;Content-type: text/html&lt;BR /&gt;&lt;BR /&gt;Date: Tue, 17 Mar 2009 17:18:19 GMT&lt;BR /&gt;&lt;BR /&gt;Connection: close&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Feb 2011 19:43:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Router-Web-Page-Authentication/m-p/1436106#M552425</guid>
      <dc:creator>ChristopherS</dc:creator>
      <dc:date>2011-02-01T19:43:25Z</dc:date>
    </item>
  </channel>
</rss>

