Jump to content
Sign in to follow this  
DuncanM

Browser-Based Firewall Configuration

Recommended Posts

DuncanM

Hello, I am new to AutoIT and would like to use it to automatically configure firewalls via their browser-based interface (via IE). First, I need to import the device's SSL certificates into IE. Then, for the device configuration, the interface has 2 frames - the first one on the left contains the different configuration categories (Network, Access Rules, Logs, etc.), and the right window is where the configuration is actually done using forms, check boxes, etc. Lastly, to ensure that the user does not interrupt, is there any way I can disable user input while the script is running? Any help as to how I might get started (or a sample script if anyone's done this before) would be greatly appreciated.

Share this post


Link to post
Share on other sites
lod3n

Take a look at the IE functions in the latest beta. You'll probably need to start with _IEFrameGetCollection, and you might be able to do what you need with _IELinkClickByText. To disable user input, take a look at Blockinput.

Without more information (html code examples, etc.) , we can't do much else to help.


[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Share this post


Link to post
Share on other sites
DuncanM

Take a look at the IE functions in the latest beta. You'll probably need to start with _IEFrameGetCollection, and you might be able to do what you need with _IELinkClickByText. To disable user input, take a look at Blockinput.

Without more information (html code examples, etc.) , we can't do much else to help.

Thanks - what I'm looking to configure is, for example, a D-Link router. Are there any AutoIT script examples that illustrate how to configure this type of application? Also, I see that the _IEFrameGetCollection is going to be discontinued in the next release - is there another function I should be using instead?

Share this post


Link to post
Share on other sites
lod3n

I can see why it would be discontinued, as you can just use _IETagNameGetCollection, i.e.:

$oFramess = _IETagNameGetCollection ($oIE, "frame")

As for a UDF for configuring a D-Link router, that's going to be inherently problematic. From one model of router to another, or even from one firmware release for the same router to another, the web page code may change, which may brake a script.

How many routers do you have to configure? If they're all the same version/firmware you might be able to automate that part of your job. If they differ, well, good luck with that.


[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Share this post


Link to post
Share on other sites
DuncanM

I can see why it would be discontinued, as you can just use _IETagNameGetCollection, i.e.:

$oFramess = _IETagNameGetCollection ($oIE, "frame")

As for a UDF for configuring a D-Link router, that's going to be inherently problematic. From one model of router to another, or even from one firmware release for the same router to another, the web page code may change, which may brake a script.

How many routers do you have to configure? If they're all the same version/firmware you might be able to automate that part of your job. If they differ, well, good luck with that.

Very true that a couple minor interface changes could hose the whole script, but I plan on using this for units with the same model/firmware, though I'm not sure exactly which model yet. Basically, it should involve "clicking" options in a left frame and entering data in the right window, then submitting it. I imagine it to be pretty repetitive, but haven't found any good examples along these lines..

Share this post


Link to post
Share on other sites
lod3n

Once you sort out which model, take a shot a coding up the unit tests. Read through the IE Management UDFs in the Help file, and try merging the very good sample code to see if you can sort it out. Start small. If you get stuck, post your code, and the HTML code it's working on, and someone will help you out, I'm sure.

Have fun!


[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

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.