Jump to content

content from a password protected WEBsite


Recommended Posts

Dear Forum,

I want to automation a request to a Website.

The website is Password protected and its technology is aspx.

I surfed a lot in the internet but did not find a finished work **g**. So therefore i try it by myself (even thou I am a beginner)

My first way was to analyse the traffic if I connect the password protected Website. So far so good.

Now I try to reverse engineering this Protocol. Now I have some code and it works. But I have Performance Problems.

Every Sequence takes about 5 seconds and after 8 Sequences one complete request needs about 40 sec.

Now my question: How can I read the content from a website?

My big Problem is that I do not know the content length from every request therefore I have no value for the "Byte to Read" (TCP_READ).

And if I use the "Time Out" function, I have to wait every request for five or more seconds.

I hope anybody can help me to solve this problem. For a better understanding I add a Picture.

THX :headbang:

Link to comment

Thank for your answer.

I tried to do this with DataSocket Vi's.

Now I don't know how I should do the POST State.

Activity:

1.) Request to the Login screen --> there are Fields with Username and Passwort (i tested with dataSocket --> it works)

2.) From this request you get Parameters: _ViewState, SessionID

3.) Now i have to POST this Data and Username Password:

Example:

POST /(24lqx0asze5cjyztmmym2vn3)/eu_default.aspx HTTP/1.1

Host: wos.xxx.xx

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://wos.xxx.xx(24lqx0asze5cjyztmmym2vn3)/eu_default.aspx

Content-Type: application/x-www-form-urlencoded

Content-Length:523

__VIEWSTATE=dDw2NjQxNjI3Njg7dDw7bDxpPDI%2BOz47bDx0PDtsPGk8MD47PjtsPHQ8O2w8aTwwPjtpPDI%2BO2k8ND47aTw

2Pjs%2BO2w8dDxwPHA8bDxUZXh0Oz47bDxBTk1FTERVTkc7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPEJlbnV0emVybmFtZTs%2BP

s%2BOzs%2BO3Q8cDxwPGw8VGV4dDs%2BO2w8UGFzc3dvcnQ7Pj47Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPEFubWVsZGVuOz4%2B

Oz47Oz47Pj47Pj47Pj47PqvrANTwwZYLHc5dVU5UoU1HdDcA&Enduser_Loginform%3AUsername=u_name&Enduser_Loginform

%3APassword=password&Enduser_Loginform%3Aloginform_submit=Anmelden&eu_checklogin=1&SessionID=94955664-36401868-18-36-17

After this POST i should get back the Password Protected content, but how can i do a POST with DataSocket

Thank's a lot for Answers

:headbang:

Pic2= old one

Pic3= new one

Link to comment

Hello

I do not know about the ASPX But I do this a lot with websites written in PHP. The cURL.exe program works very naturally and conveniently. In the case you want for example to return some values from a web program, you simply execute the php program with the $_POST parameters from cURL. You run a System_Exec function from LabVIEW.

Good Luck

John

Link to comment

THX for Answer MikaelH

I do this at the moment very similar.

But you also do in your Block-diagram 1000 bytes to read - but you do not know how many byte you get from this request back and this is my main Problem.

And if I set 10.000 bytes to read, then you use the time out function (because the TCP_read function is a "blocking" function)

I hope you can understand what I mean

(sorry for my poor English)

nice day

kohle

Link to comment
  • 1 month later...

:headbang:

------------------------------------------------------------------------------------------------

Problem Solved: :thumbup: :

I solved the problem with a 3rd Party tool called: cURL --> is a command line tool:

This tool have nice features. VI is posted

BR Kohle

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.