11 |
my $debug = 0; |
my $debug = 0; |
12 |
my $quiet = 1; |
my $quiet = 1; |
13 |
my $verbose = 0; |
my $verbose = 0; |
14 |
|
my $credentials = 0; |
15 |
|
|
16 |
my $resend_search_delay = 3; |
my $resend_search_delay = 3; |
17 |
my $tftp_path = '/srv/tftp/'; |
my $tftp_path = '/srv/tftp/'; |
24 |
"verbose!" => \$verbose, |
"verbose!" => \$verbose, |
25 |
"search=i" => \$resend_search_delay, |
"search=i" => \$resend_search_delay, |
26 |
"tftp=s" => \$tftp_path, |
"tftp=s" => \$tftp_path, |
27 |
|
"credentials" => \$credentials, |
28 |
); |
); |
29 |
|
|
30 |
$quiet = 0 if $verbose; |
$quiet = 0 if $verbose; |
40 |
while(<$fh>) { |
while(<$fh>) { |
41 |
chomp; |
chomp; |
42 |
next if /^#/ || /^$/ || /^\s+$/; |
next if /^#/ || /^$/ || /^\s+$/; |
43 |
if (/^\S+\t\S+$/) { |
if (/^\S+\s\S+$/) { |
44 |
push @try_accounts, $_; |
push @try_accounts, $_; |
45 |
} else { |
} else { |
46 |
warn "invalid $passwd_path entry: $_\n"; |
warn "invalid $passwd_path entry: $_\n"; |
219 |
next; |
next; |
220 |
} else { |
} else { |
221 |
$ant_ok_password->{$ant}++; |
$ant_ok_password->{$ant}++; |
222 |
|
print "$ant credentials $user_id $user_pwd\n" if ($credentials && $ant_ok_password->{$ant} == 1); |
223 |
} |
} |
224 |
|
|
225 |
my $board = $h->{'_BOARD_NAME'} || die "no _BOARD_NAME?"; |
my $board = $h->{'_BOARD_NAME'} || die "no _BOARD_NAME?"; |