blob: 610e10299959a8f7e1725ae2ae6b134847c1f9ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/local/bin/perl
use blib;
use Net::FTP;
use Getopt::Long;
$opt_debug = undef;
$opt_firewall = undef;
GetOptions(qw(debug firewall=s));
@firewall = defined $opt_firewall ? (Firewall => $opt_firewall) : ();
foreach $host (@ARGV)
{
$ftp = Net::FTP->new($host, @firewall, Debug => $opt_debug ? 1 : 0);
$ftp->login();
print $ftp->pwd,"\n";
$ftp->quit;
}
|