Jump to content

Reading data from (protected) webpage.


Recommended Posts

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 ...
 

Link to comment
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.

Link to comment
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 ...
 

Link to comment
Share on other sites

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
Link to comment
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 ...
 

Link to comment
Share on other sites

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
Link to comment
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
Link to comment
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 ...
 

Link to comment
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.

Link to comment
Share on other sites

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 ...
 

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...