Jump to content
Sign in to follow this  
LurchMan

Secure Download

Recommended Posts

LurchMan

Hey everyone -

I'm working on a small project that logs into an external website, then downloads a file from it each day. The problem I'm having is that if I use INetGet after I login using the _IE* functions and leave IE open in the background, all it downloads is a file containing the HTML source of the login page.

Is there a way to do this without clicking on the link through the _IE* functions and automating the download dialogs?

Any questions let me know. Thanks in advance.

--Lurch

Edit: Forgot to mention this website after you login becomes a secure website of some sort.

Edited by LurchMan

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites
wakillon

Hey everyone -

I'm working on a small project that logs into an external website, then downloads a file from it each day. The problem I'm having is that if I use INetGet after I login using the _IE* functions and leave IE open in the background, all it downloads is a file containing the HTML source of the login page.

Is there a way to do this without clicking on the link through the _IE* functions and automating the download dialogs?

Any questions let me know. Thanks in advance.

--Lurch

Edit: Forgot to mention this website after you login becomes a secure website of some sort.

If it's java link you can't, but if it's a normal link you can retrieve it by ie or source code.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
LurchMan

If it's java link you can't, but if it's a normal link you can retrieve it by ie or source code.

I'm no website expert by any means but I don't think its a java link (I don't see anything in the source of the website that would make me think its java. The link has an "href" in the source pointing towards the file.

Could you elaborate a little more please? I've got this functioning by automating the dialog boxes currently but when I have to deploy this app to several users with varying systems that becomes a little tricky. Any help is appreciated, thanks!


Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites
wakillon

Try this for extract all links of a web page.

#include <Array.au3>

$_Source = _GetSourceCode ( $_Url )
$_ArrayLinks = StringRegExp ( $_Source, '(?s)(?i)<a href="(.*?)"', 3 )
_ArrayDisplay ( $_ArrayLinks )

Func _GetSourceCode ( $_Url )
    $_InetRead = InetRead ( $_Url )
    If Not @Error Then
        $_BinaryToString = BinaryToString ( $_InetRead )
        If Not @Error Then Return $_BinaryToString
    EndIf
    Return 0
EndFunc ;==> _GetSourceCode ( )

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
LurchMan

I've got a way to extract the links, the problem I'm having is I can't get it to download the file without using the download dialog boxes.

Edit: I was heading in the completely wrong direction with this. Thank you for taking your time to look at this though.

Edited by LurchMan

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.