• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 408
  • Last Modified:


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
  • 2
1 Solution
michapdmAuthor Commented:
Problem is fixed I use Wireshark, und I logged the transmission to the server, then all Values i put in the mechanizer with adjustment.
michapdmAuthor Commented:
fixed by my self

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now