Posted on 2011-10-17
Last Modified: 2012-05-12
I am new with Perl and mechanize,
I have follow output From Webinterface of common switch, the Switch have no Commandline,
so I have 60 Switches and I will automaticly save the Config to an TFTP Server,

 mech-dump --forms http://172.16.x.x/en/config_transfer.htm
GET http://172.16.x.x/en/config_transfer.htm [genForm]
  WINDWEB_URL=/fs/doc/protected/en/config_transfer.htm (hidden readonly)
  resetPageVars=0                (hidden readonly)
  applyChanges=0                 (hidden readonly)
  commitClientIp=         (hidden readonly)
  manualLogout=1                 (hidden readonly)
  commitPassword=password        (hidden readonly)
  scriptFaultDetected=0          (hidden readonly)
  flagReboot=1                   (hidden readonly)
  FlMSwitch_flWorkFWCtrlConfStatus=1 (hidden readonly)
  FlMSwitch_flWorkFWConfigTftpIPAddr=172.16.x.x (text)
  FlMSwitch_flWorkFWConfigTftpFile=Glattfelden1.cfg (text)
  FlMSwitch_flWorkFWConfigExecute=<UNDEF> (radio)    [3/device to host|2/host to device]
  password=                      (password)
  Apply=Apply                    (button)
  saveChanges=0                  (hidden readonly)

Now I must write
the Module for that, How I am going to use the data from mechdump --forms
into my for Example

use WWW::Mechanize;
my $m = WWW::Mechanize->new();

$m = WWW::Mechanize->new();

$url = 'http://172.16.x.x/en/config_transfer.htm';
$m->get($url); ??

How I complete the Code so that Mechanize puts automaticli the Passwort in
give always a new Ip for the tftp Server and submits the form?

I just need a running example
Question by:michapdm

    Accepted Solution

    Problem is fixed I use Wireshark, und I logged the transmission to the server, then all Values i put in the mechanizer with adjustment.

    Author Closing Comment

    fixed by my self

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now