Jump to content

[SOLVED] Mirror a Website Automatically


Recommended Posts

Question,

Right now, I don't have a lick of code, as of yet, because the _IE functions, INET functions and $IE functions dont seem to do what I want them to do. I have a website that I'm an administrator on, and I want to be able to mirror the entire contents of that website into an offline application. IE, I'd like to make 2 autoit programs, one to go out and mirror the website, and the other is the front end to the offline material.

But, the main problem is that the website i'm an admin on is an implementation of InstantKB.net. You HAVE to log in using the javascript embeded form on the website, and then it writes a cookie, and then you can navigate around the KB all you want.

If it didn't have a password, I could just use INETGETSOURCE on an address like: http://kb.myhost.com/article.aspx?id=10022

But, since I do have a password protected login, If i try to go to that directly it just gives me a default page.

Right now, there's about 500 articals on that site, so i know how to write the routine to go from 10001 to 10500 just fine; but how do I get passed the login and cookie issue?

Ideas?

Edited by zackrspv

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

Is it possible for autoit to use a cookie that is already enabled so that I can bypass a login screen?

What i mean is that: I have already signed in using FF or IE to the website (thus the cookie exists), can autoit IE functions (either one) use that cookie to bypass me from having to log into the website. If so, it would greatly help me.

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

Is it possible for autoit to use a cookie that is already enabled so that I can bypass a login screen?

What i mean is that: I have already signed in using FF or IE to the website (thus the cookie exists), can autoit IE functions (either one) use that cookie to bypass me from having to log into the website. If so, it would greatly help me.

muahahaha, i got it.

$oIE = _IEAttach("blah")
$sCookie = $oIE.document.cookie
$text = GUICtrlCreateLabel("", 0, 32, 399, 399)
$edit = guictrlcreateedit("", 0 , 62, 900, 900)
Func getTerms()
$url = "http://kb.mysite.com/article.aspx?id=" & $id 
_IENavigate($oIE, $url)
$sHTML = _IEBodyReadHTML($oIE)
guictrlsetdata($edit, $sHTML)

Hehe, now i can do whatever i want hahaha, nice :) I wish i didn't need to have the other IE window open tho, but oh well.

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

Good job.

You can open the IE Window invisible (parameter to _IECreate or option in _IEAction) if you want to (just make certain to _IEQuit when you are done).

If you are motivated to learn it, you can also get the data with XMLHttpRequest http://en.wikipedia.org/wiki/Xmlhttprequest

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Good job.

You can open the IE Window invisible (parameter to _IECreate or option in _IEAction) if you want to (just make certain to _IEQuit when you are done).

If you are motivated to learn it, you can also get the data with XMLHttpRequest http://en.wikipedia.org/wiki/Xmlhttprequest

Dale

The only part that sux is that I have to manually log into the website :/ Because it is using Javascript forms, etc on an ASPX webpage, it doesn't let me get the ID's or even Names of the form elements :/ At least I can't get it to do it lol. I have done the index thing too, but doesn't seem to work. But, hey, at least it's doing somewhat like it's suposed to :)

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

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