Automate Web Configuration

Discussion in 'Python' started by D, Sep 7, 2006.

  1. D

    D Guest

    I would like to write a program that will automate the configuation of
    a firewall or router via HTTPS. So, I need to import the applicable
    certificate, and be able to configure the unit as if I was
    typing/selecting the appropriate fields manually using a web browser.
    If there is a command-line based tool that would allow me to do this, I
    would be more than willing to give it a try. Otherwise, is there a
    Python library that would do the same? Thanks.
     
    D, Sep 7, 2006
    #1
    1. Advertising

  2. D

    Steve Holden Guest

    D wrote:
    > I would like to write a program that will automate the configuation of
    > a firewall or router via HTTPS. So, I need to import the applicable
    > certificate, and be able to configure the unit as if I was
    > typing/selecting the appropriate fields manually using a web browser.
    > If there is a command-line based tool that would allow me to do this, I
    > would be more than willing to give it a try. Otherwise, is there a
    > Python library that would do the same? Thanks.
    >

    Look for the Mechanize and ClientForm libraries: they can be used to
    automate all sorts of web tasks.

    regards
    Steve
    --
    Steve Holden +44 150 684 7255 +1 800 494 3119
    Holden Web LLC/Ltd http://www.holdenweb.com
    Skype: holdenweb http://holdenweb.blogspot.com
    Recent Ramblings http://del.icio.us/steve.holden
     
    Steve Holden, Sep 7, 2006
    #2
    1. Advertising

  3. D

    Guest

    It is not FREE and not python, but you can try automation software like
    Automation Anywhere
    http://www.tethyssolutions.com/automation-software.htm to automate this
    task and more. Just record your actions in web browser and it will
    replay it back accurately.

    You can also try Workspace Macro Pro,
    http://www.tethyssolutions.com/macro-automation.htm if you don't need
    advanced capabilities of Automation Anywhere.

    Tethys Solutions, Expert Services Group
    http://www.tethyssolutions.com/ask-the-expert.htm
    SMART Macro & Automation Software

    D wrote:
    > I would like to write a program that will automate the configuation of
    > a firewall or router via HTTPS. So, I need to import the applicable
    > certificate, and be able to configure the unit as if I was
    > typing/selecting the appropriate fields manually using a web browser.
    > If there is a command-line based tool that would allow me to do this, I
    > would be more than willing to give it a try. Otherwise, is there a
    > Python library that would do the same? Thanks.
     
    , Sep 7, 2006
    #3
  4. D

    John J. Lee Guest

    Steve Holden <> writes:

    > D wrote:
    > > I would like to write a program that will automate the configuation of
    > > a firewall or router via HTTPS. So, I need to import the applicable
    > > certificate, and be able to configure the unit as if I was
    > > typing/selecting the appropriate fields manually using a web browser.
    > > If there is a command-line based tool that would allow me to do this, I
    > > would be more than willing to give it a try. Otherwise, is there a
    > > Python library that would do the same? Thanks.
    > >

    > Look for the Mechanize and ClientForm libraries: they can be used to
    > automate all sorts of web tasks.


    Note that neither mechanize nor the standard library do a great job
    with HTTPS client certificates (nor server certificates, for that
    matter: those are not checked at all): You have to convert your
    certificate file to the right format (e.g. using the "openssl" program
    from OpenSSL -- the mechanize API docs explain how), and the only way
    to supply the password right now is on the console. Hmm, it occurs to
    me right now that maybe if your key has no password, it won't insist
    on console input? Perhaps the same applies if you're running some
    sort of keyserver? I haven't looked at the OpenSSL API docs to check.
    If not, no doubt one could improve mechanize's behaviour here by using
    something like PyOpenSSL or M2Crypto (or use the facilities provided
    by those libraries directly -- see below).

    (If you want to use mechanize right now I recommend checking it out
    from SVN rather than using the last-released version. The official
    stable release is coming "RSN". Getting docs done is hard work!-)

    A few other HTTPS problems (both stdlib and mechanize are affected):

    - No special CONNECT support for HTTPS proxies (you can do it, but
    it's a pain)

    - I think socket timeouts don't work for HTTPS (I forget why, so not
    sure what work-arounds would apply)


    If any of those limitations affect you (note they DON'T affect lots of
    people doing HTTPS), try M2Crypto or perhaps PyOpenSSL (I don't really
    know either library, but I'm pretty sure M2Crypto has an httplib
    work-alike).


    John
     
    John J. Lee, Sep 7, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vallinayagam

    Automate Data Entry in Web pages

    vallinayagam, Jun 21, 2004, in forum: Perl
    Replies:
    2
    Views:
    543
  2. Mark
    Replies:
    0
    Views:
    835
  3. Terry King

    Automate filling out web forms ??

    Terry King, Jun 23, 2003, in forum: HTML
    Replies:
    3
    Views:
    6,173
    Terry King
    Jun 24, 2003
  4. Hal Fulton
    Replies:
    12
    Views:
    385
    Esteban Manchado Velázquez
    Oct 26, 2006
  5. Priyank Shah
    Replies:
    5
    Views:
    279
    Michael Peterson
    Mar 2, 2011
Loading...

Share This Page