Sign in to follow this  
Followers 0
MvGulik

Reading data from (protected) webpage.

11 posts in this topic

Trying to read (load from within AutoIt exe) a protected (personal user data page) webpage.

so I got a URL. (www.somesite.com/somepage)

a loginname. (myuser)

and a password. (mypassword)

I tried the in the AutoIt documented "http://myuser:mypassword@www.somesite.com/somepage" way with InetGet/InetRead. But thats not working. (at least not in this case.)

Although this seems to be a general internet method to pass a loginname & password with a URL. For HTTP it seems to be not the general way to go about it. (assuming target website is not supporting this method.)

I'm not having a clue at what I should look next.

- Proxy?. Probably not, but not sure.

- TCP/UDP? I hope not.

- Alternative UDF?

- others


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites



I think the username and password only work for FTP or any protocol like SSH that expect a login from distance. Not all HTTP page support it and I don't think I ever see any http page does this.

Maybe you should tell us exactly what kind of data from which web page so maybe people can test with it.

Share this post


Link to post
Share on other sites

I got a better idea. As test URL the AutoIt profile page should work fine. At least you don't need my login data that way. ;)

http://www.autoitscript.com/forum/index.php?showuser=<yourUserId>


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

That's because the autoit website has a file called "index.php" and you pass the argument showuser=[userID] to that file using GET method. This has nothing to do with the http://user:pass@... you are talking about.

Maybe another example should help.

Edited by trung0407

Share this post


Link to post
Share on other sites

Can't think of any other example. Plus I'm not following your last message. Lack of http/net knowledge in my case.


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

There is no point to make a program if you don't have example to test with. At least InetGet/InetRead with user:pass will only work on server which expect that kind of login through url.

Maybe rapidshare or megaupload, they allow download files with user and pass

Edited by trung0407

Share this post


Link to post
Share on other sites

At some point after IE6 (IE7 or IE8) that functionality was removed as a security threat. See KB834489: Internet Explorer does not support user names and passwords in Web site addresses (HTTP or HTTPS URLs).

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

I probably should refrase the question. ... maybe later.


"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

What I get is that you want to connect to a personal profile page (which require a login and password), from that download the page and get information inside the file.

With the method from INetGet... you can't do that with normal web page.

What you can do is to create an IE object, from that control the page content and navigate.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Yep.

Was kinda afraid of that. Don't really like to use the IE method (+ never used it yet to), but it seems to be the most productive solution. Will take a look at it.

---

(see no need to bump topic yet)

IE method on hold.

Eyeballing and experimenting with "WinHTTP" and "WinInet" UDF's. (Got url contact, but no authorization(Base64Encode) success yet. ... might need to pickup a login cookie.)

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

If you use the (builtin) IE UDF then it should be straight forward.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0