Windows NT KAMIDAKI 10.0 build 19045 (Windows 10) AMD64
Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.9
Server IP : 192.168.3.16 & Your IP : 216.73.216.140
Domains :
Cant Read [ /etc/named.conf ]
User : SISTEMA
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
C: /
xampp /
perl /
bin /
Delete
Unzip
Name
Size
Permission
Date
Action
SOAPsh.bat
3.35
KB
-rwxrwxrwx
2021-01-24 18:08
SOAPsh.pl
2.75
KB
-rw-rw-rw-
2021-01-24 18:01
bdf2gdfont.bat
5.26
KB
-rwxrwxrwx
2021-01-24 18:08
bdf2gdfont.pl
4.75
KB
-rw-rw-rw-
2021-01-24 17:46
chartex
5.67
KB
-rw-rw-rw-
2021-01-24 18:01
chartex.bat
6.47
KB
-rwxrwxrwx
2021-01-24 18:08
config_data
7.2
KB
-rw-rw-rw-
2021-01-24 18:01
config_data.bat
7.73
KB
-rwxrwxrwx
2024-07-26 17:42
corelist.bat
15.75
KB
-rwxrwxrwx
2023-11-19 11:41
cpan
8.06
KB
-rw-rw-rw-
2021-01-24 18:01
cpan-mirrors
4.18
KB
-rw-rw-rw-
2021-01-24 18:01
cpan-mirrors.bat
5.1
KB
-rwxrwxrwx
2021-01-24 18:08
cpan-outdated
8.85
KB
-rw-rw-rw-
2021-01-24 18:01
cpan-outdated.bat
9.67
KB
-rwxrwxrwx
2021-01-24 18:08
cpan.bat
9.16
KB
-rwxrwxrwx
2021-01-24 18:08
cpan2dist
21.22
KB
-rw-rw-rw-
2021-01-24 18:01
cpan2dist.bat
22.39
KB
-rwxrwxrwx
2021-01-24 18:08
cpandb
6.6
KB
-rw-rw-rw-
2021-01-24 18:01
cpandb.bat
7.37
KB
-rwxrwxrwx
2021-01-24 18:08
cpanel_json_xs
9.75
KB
-rw-rw-rw-
2021-01-24 18:01
cpanel_json_xs.bat
10.58
KB
-rwxrwxrwx
2021-01-24 18:08
cpanfile-dump
3.45
KB
-rw-rw-rw-
2021-01-24 16:20
cpanfile-dump.bat
4.08
KB
-rwxrwxrwx
2021-01-24 18:08
cpanm
295.67
KB
-rw-rw-rw-
2021-01-24 16:36
cpanm.bat
297.23
KB
-rwxrwxrwx
2021-01-24 18:08
cpanp
3.22
KB
-rw-rw-rw-
2021-01-24 18:01
cpanp-run-perl
459
B
-rw-rw-rw-
2021-01-24 16:38
cpanp-run-perl.bat
990
B
-rwxrwxrwx
2021-01-24 18:08
cpanp.bat
3.84
KB
-rwxrwxrwx
2021-01-24 18:08
crc32
1.01
KB
-rw-rw-rw-
2021-01-24 18:01
crc32.bat
1.57
KB
-rwxrwxrwx
2021-01-24 18:08
dbicadmin
7
KB
-rw-rw-rw-
2021-01-24 18:01
dbicadmin.bat
7.87
KB
-rwxrwxrwx
2021-01-24 18:08
dbilogstrip
1.39
KB
-rw-rw-rw-
2021-01-24 17:15
dbilogstrip.bat
1.89
KB
-rwxrwxrwx
2021-01-24 18:08
dbiprof
6.31
KB
-rw-rw-rw-
2021-01-24 17:15
dbiprof.bat
6.82
KB
-rwxrwxrwx
2021-01-24 18:08
dbiproxy
5.44
KB
-rw-rw-rw-
2021-01-24 17:15
dbiproxy.bat
5.95
KB
-rwxrwxrwx
2021-01-24 18:08
enc2xs
40.68
KB
-rw-rw-rw-
2021-01-24 18:01
enc2xs.bat
42.87
KB
-rwxrwxrwx
2021-01-24 18:08
encguess
2.91
KB
-rw-rw-rw-
2021-01-24 18:01
encguess.bat
3.8
KB
-rwxrwxrwx
2021-01-24 18:08
exe_update.bat
4.71
KB
-rwxrwxrwx
2021-01-24 18:08
exe_update.pl
4.05
KB
-rw-rw-rw-
2021-01-24 18:01
exetype.bat
3.53
KB
-rwxrwxrwx
2021-01-24 18:08
extract_vba
2.98
KB
-rw-rw-rw-
2021-01-24 18:01
extract_vba.bat
3.62
KB
-rwxrwxrwx
2021-01-24 18:08
factor.bat
3.77
KB
-rwxrwxrwx
2021-01-24 18:08
factor.pl
3.16
KB
-rw-rw-rw-
2021-01-24 18:01
findrule
3.24
KB
-rw-rw-rw-
2021-01-24 16:52
findrule.bat
3.88
KB
-rwxrwxrwx
2021-01-24 18:08
h2ph.bat
30.27
KB
-rwxrwxrwx
2024-07-26 17:42
h2xs.bat
62.43
KB
-rwxrwxrwx
2024-07-26 17:42
htmltree
1.28
KB
-rw-rw-rw-
2021-01-24 18:01
htmltree.bat
1.81
KB
-rwxrwxrwx
2024-07-26 17:42
hypnotoad
1.03
KB
-rw-rw-rw-
2021-01-24 16:59
hypnotoad.bat
1.58
KB
-rwxrwxrwx
2021-01-24 18:08
instmodsh
4.09
KB
-rw-rw-rw-
2021-01-24 18:01
instmodsh.bat
5.03
KB
-rwxrwxrwx
2021-01-24 18:08
json_pp
4.77
KB
-rw-rw-rw-
2021-01-24 18:01
json_pp.bat
5.52
KB
-rwxrwxrwx
2024-07-26 17:42
json_xs
6.84
KB
-rw-rw-rw-
2021-01-24 18:01
json_xs.bat
7.6
KB
-rwxrwxrwx
2021-01-24 18:08
kwalitee-metrics
2.34
KB
-rw-rw-rw-
2021-01-24 18:01
kwalitee-metrics.bat
2.96
KB
-rwxrwxrwx
2021-01-24 18:08
libgcc_s_seh-1.dll
74.5
KB
-rw-rw-rw-
2019-03-14 23:36
libnetcfg.bat
16.88
KB
-rwxrwxrwx
2024-07-26 17:42
libstdc++-6.dll
1.36
MB
-rw-rw-rw-
2019-03-14 23:36
libwinpthread-1.dll
51
KB
-rw-rw-rw-
2019-03-14 23:36
llw32helper.bat
4.8
KB
-rwxrwxrwx
2021-01-24 18:08
llw32helper.pl
4.13
KB
-rw-rw-rw-
2021-01-24 17:51
lwp-download
10.04
KB
-rw-rw-rw-
2021-01-24 18:01
lwp-download.bat
10.88
KB
-rwxrwxrwx
2021-01-24 18:08
lwp-dump
2.64
KB
-rw-rw-rw-
2021-01-24 18:01
lwp-dump.bat
3.26
KB
-rwxrwxrwx
2021-01-24 18:08
lwp-mirror
2.35
KB
-rw-rw-rw-
2021-01-24 18:01
lwp-mirror.bat
2.96
KB
-rwxrwxrwx
2021-01-24 18:08
lwp-request
15.81
KB
-rw-rw-rw-
2021-01-24 18:01
lwp-request.bat
16.88
KB
-rwxrwxrwx
2021-01-24 18:08
mech-dump
4.74
KB
-rw-rw-rw-
2021-01-24 18:01
mech-dump.bat
5.44
KB
-rwxrwxrwx
2021-01-24 18:08
minicpan
5.36
KB
-rw-rw-rw-
2021-01-24 18:08
minicpan.bat
6.05
KB
-rwxrwxrwx
2021-01-24 18:08
module-version
2.06
KB
-rw-rw-rw-
2021-01-24 17:51
module-version.bat
2.65
KB
-rwxrwxrwx
2021-01-24 18:08
mojo
408
B
-rw-rw-rw-
2021-01-24 16:59
mojo.bat
953
B
-rwxrwxrwx
2021-01-24 18:08
moose-outdated
427
B
-rw-rw-rw-
2021-01-24 18:01
moose-outdated.bat
977
B
-rwxrwxrwx
2021-01-24 18:08
morbo
2.15
KB
-rw-rw-rw-
2021-01-24 16:59
morbo.bat
2.72
KB
-rwxrwxrwx
2021-01-24 18:08
mymeta-cpanfile
2.7
KB
-rw-rw-rw-
2021-01-24 16:20
mymeta-cpanfile.bat
3.32
KB
-rwxrwxrwx
2021-01-24 18:08
nssm_32.exe
288
KB
-rwxrwxrwx
2021-01-24 16:50
nssm_64.exe
323.5
KB
-rwxrwxrwx
2021-01-24 16:50
package-stash-conflicts
463
B
-rw-rw-rw-
2021-01-24 18:01
package-stash-conflicts.bat
1013
B
-rwxrwxrwx
2021-01-24 18:08
parinstallppd
3.35
KB
-rw-rw-rw-
2021-01-24 18:01
parinstallppd.bat
3.99
KB
-rwxrwxrwx
2021-01-24 18:08
perl.exe
39
KB
-rwxrwxrwx
2021-01-24 16:06
perl5.32.1.exe
39
KB
-rwxrwxrwx
2021-01-24 16:06
perl532.dll
3.26
MB
-rw-rw-rw-
2021-01-24 16:07
perlbug.bat
46.8
KB
-rwxrwxrwx
2024-07-26 17:42
perldoc.bat
1016
B
-rwxrwxrwx
2023-11-19 11:41
perlglob.bat
1.95
KB
-rwxrwxrwx
2021-01-24 18:08
perlglob.exe
17
KB
-rwxrwxrwx
2021-01-24 16:01
perlivp.bat
11.72
KB
-rwxrwxrwx
2024-07-26 17:42
perlthanks.bat
46.8
KB
-rwxrwxrwx
2024-07-26 17:42
perltidy
175.27
KB
-rw-rw-rw-
2021-01-24 18:01
perltidy.bat
180.32
KB
-rwxrwxrwx
2021-01-24 18:08
pgplet
10.37
KB
-rw-rw-rw-
2021-01-24 18:01
pgplet.bat
11.22
KB
-rwxrwxrwx
2021-01-24 18:08
piconv
8.07
KB
-rw-rw-rw-
2021-01-24 18:01
piconv.bat
9.13
KB
-rwxrwxrwx
2021-01-24 18:08
pkg-config
46.94
KB
-rw-rw-rw-
2021-01-24 18:01
pkg-config.bat
49.2
KB
-rwxrwxrwx
2021-01-24 18:08
pl2bat.bat
11.49
KB
-rwxrwxrwx
2021-01-24 18:08
pl2bat.pl
10.4
KB
-rw-rw-rw-
2021-01-24 18:01
pl2pm.bat
5.56
KB
-rwxrwxrwx
2024-07-26 17:42
pler
540
B
-rw-rw-rw-
2021-01-24 18:01
pler.bat
1.07
KB
-rwxrwxrwx
2021-01-24 18:08
pm-uninstall
820
B
-rw-rw-rw-
2021-01-24 18:01
pm-uninstall.bat
1.28
KB
-rwxrwxrwx
2023-11-19 11:41
pod2html.bat
5.02
KB
-rwxrwxrwx
2024-07-26 17:42
pod2latex
10.39
KB
-rw-rw-rw-
2024-07-26 17:42
pod2latex.bat
10.92
KB
-rwxrwxrwx
2024-07-26 17:42
pod2man.bat
15.42
KB
-rwxrwxrwx
2023-11-19 11:41
pod2text.bat
11.29
KB
-rwxrwxrwx
2023-11-19 11:41
pod2usage
4.16
KB
-rw-rw-rw-
2021-01-24 16:27
pod2usage.bat
4.67
KB
-rwxrwxrwx
2021-01-24 18:08
pod_cover
1.37
KB
-rw-rw-rw-
2021-01-24 18:01
pod_cover.bat
1.94
KB
-rwxrwxrwx
2021-01-24 18:08
podchecker
3.7
KB
-rw-rw-rw-
2021-01-24 16:27
podchecker.bat
4.21
KB
-rwxrwxrwx
2021-01-24 18:08
podselect
2.56
KB
-rw-rw-rw-
2021-01-24 16:25
podselect.bat
3.07
KB
-rwxrwxrwx
2021-01-24 18:08
ppd2par
4.64
KB
-rw-rw-rw-
2021-01-24 18:01
ppd2par.bat
5.32
KB
-rwxrwxrwx
2021-01-24 18:08
ppm.bat
35.53
KB
-rwxrwxrwx
2021-01-24 18:08
ppm.pl
33.99
KB
-rw-rw-rw-
2021-01-24 18:01
primes.bat
21.45
KB
-rwxrwxrwx
2021-01-24 18:08
primes.pl
20.34
KB
-rw-rw-rw-
2021-01-24 18:01
prove.bat
14.07
KB
-rwxrwxrwx
2023-11-19 11:41
ptar
3.38
KB
-rw-rw-rw-
2021-01-24 18:01
ptar.bat
4.28
KB
-rwxrwxrwx
2021-01-24 18:08
ptardiff
2.48
KB
-rw-rw-rw-
2021-01-24 18:01
ptardiff.bat
3.35
KB
-rwxrwxrwx
2021-01-24 18:08
ptargrep
4.19
KB
-rw-rw-rw-
2021-01-24 18:01
ptargrep.bat
5.14
KB
-rwxrwxrwx
2021-01-24 18:08
runperl.bat
2.72
KB
-rwxrwxrwx
2021-01-24 18:08
scan-perl-prereqs-nqlite
5.28
KB
-rw-rw-rw-
2021-01-24 16:24
scan-perl-prereqs-nqlite.bat
6
KB
-rwxrwxrwx
2021-01-24 18:08
search.bat
55.83
KB
-rwxrwxrwx
2021-01-24 18:08
shasum.bat
10.48
KB
-rwxrwxrwx
2023-11-19 11:41
splain.bat
20.43
KB
-rwxrwxrwx
2024-07-26 17:42
streamzip
5.45
KB
-rw-rw-rw-
2021-01-24 18:01
streamzip.bat
6.17
KB
-rwxrwxrwx
2021-01-24 18:08
stubmaker.bat
4.01
KB
-rwxrwxrwx
2021-01-24 18:08
stubmaker.pl
3.35
KB
-rw-rw-rw-
2021-01-24 18:01
test-yaml
1017
B
-rw-rw-rw-
2021-01-24 18:01
test-yaml.bat
1.56
KB
-rwxrwxrwx
2021-01-24 18:08
tpage
8.85
KB
-rw-rw-rw-
2021-01-24 18:01
tpage.bat
9.64
KB
-rwxrwxrwx
2021-01-24 18:08
ttree
38.21
KB
-rw-rw-rw-
2021-01-24 18:01
ttree.bat
39.9
KB
-rwxrwxrwx
2021-01-24 18:08
use-devel-checklib
2.7
KB
-rw-rw-rw-
2021-01-24 16:53
use-devel-checklib.bat
3.31
KB
-rwxrwxrwx
2021-01-24 18:08
whirlpoolsum
4.93
KB
-rw-rw-rw-
2021-01-24 18:01
whirlpoolsum.bat
5.67
KB
-rwxrwxrwx
2021-01-24 18:08
wperl.exe
39
KB
-rwxrwxrwx
2021-01-24 16:06
xml_grep
13.32
KB
-rw-rw-rw-
2021-01-24 18:01
xml_grep.bat
14.3
KB
-rwxrwxrwx
2021-01-24 18:08
xml_merge
3.89
KB
-rw-rw-rw-
2021-01-24 18:01
xml_merge.bat
4.55
KB
-rwxrwxrwx
2021-01-24 18:08
xml_pp
7.82
KB
-rw-rw-rw-
2021-01-24 18:01
xml_pp.bat
8.61
KB
-rwxrwxrwx
2021-01-24 18:08
xml_spellcheck
6.34
KB
-rw-rw-rw-
2021-01-24 18:01
xml_spellcheck.bat
7.1
KB
-rwxrwxrwx
2021-01-24 18:08
xml_split
21.13
KB
-rw-rw-rw-
2021-01-24 18:01
xml_split.bat
22.27
KB
-rwxrwxrwx
2021-01-24 18:08
xsubpp.bat
5.78
KB
-rwxrwxrwx
2023-11-19 11:41
zipdetails
56.01
KB
-rw-rw-rw-
2021-01-24 18:01
zipdetails.bat
58.95
KB
-rwxrwxrwx
2021-01-24 18:08
Save
Rename
@rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT IF EXIST "%~dp0perl.exe" ( "%~dp0perl.exe" -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 ) ELSE IF EXIST "%~dp0..\..\bin\perl.exe" ( "%~dp0..\..\bin\perl.exe" -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 ) ELSE ( perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 ) goto endofperl :WinNT IF EXIST "%~dp0perl.exe" ( "%~dp0perl.exe" -x -S %0 %* ) ELSE IF EXIST "%~dp0..\..\bin\perl.exe" ( "%~dp0..\..\bin\perl.exe" -x -S %0 %* ) ELSE ( perl -x -S %0 %* ) if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; #!perl #line 29 eval 'exec C:\xampp\perl\bin\perl.exe -S $0 ${1+"$@"}' if $running_under_some_shell; =head1 NAME libnetcfg - configure libnet =head1 DESCRIPTION The libnetcfg utility can be used to configure the libnet. Starting from perl 5.8 libnet is part of the standard Perl distribution, but the libnetcfg can be used for any libnet installation. =head1 USAGE Without arguments libnetcfg displays the current configuration. $ libnetcfg # old config ./libnet.cfg daytime_hosts ntp1.none.such ftp_int_passive 0 ftp_testhost ftp.funet.fi inet_domain none.such nntp_hosts nntp.none.such ph_hosts pop3_hosts pop.none.such smtp_hosts smtp.none.such snpp_hosts test_exist 1 test_hosts 1 time_hosts ntp.none.such # libnetcfg -h for help $ It tells where the old configuration file was found (if found). The C<-h> option will show a usage message. To change the configuration you will need to use either the C<-c> or the C<-d> options. The default name of the old configuration file is by default "libnet.cfg", unless otherwise specified using the -i option, C<-i oldfile>, and it is searched first from the current directory, and then from your module path. The default name of the new configuration file is "libnet.cfg", and by default it is written to the current directory, unless otherwise specified using the -o option, C<-o newfile>. =head1 SEE ALSO L<Net::Config>, L<libnetFAQ> =head1 AUTHORS Graham Barr, the original Configure script of libnet. Jarkko Hietaniemi, conversion into libnetcfg for inclusion into Perl 5.8. =cut # $Id: Configure,v 1.8 1997/03/04 09:22:32 gbarr Exp $ BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use IO::File; use Getopt::Std; use ExtUtils::MakeMaker qw(prompt); use File::Spec; use vars qw($opt_d $opt_c $opt_h $opt_o $opt_i); ## ## ## my %cfg = (); my @cfg = (); my($libnet_cfg_in,$libnet_cfg_out,$msg,$ans,$def,$have_old); ## ## ## sub valid_host { my $h = shift; defined($h) && (($cfg{'test_exist'} == 0) || gethostbyname($h)); } ## ## ## sub test_hostnames (\@) { my $hlist = shift; my @h = (); my $host; my $err = 0; foreach $host (@$hlist) { if(valid_host($host)) { push(@h, $host); next; } warn "Bad hostname: '$host'\n"; $err++; } @$hlist = @h; $err ? join(" ",@h) : undef; } ## ## ## sub Prompt { my($prompt,$def) = @_; $def = "" unless defined $def; chomp($prompt); if($opt_d) { print $prompt,," [",$def,"]\n"; return $def; } prompt($prompt,$def); } ## ## ## sub get_host_list { my($prompt,$def) = @_; $def = join(" ",@$def) if ref($def); my @hosts; do { my $ans = Prompt($prompt,$def); $ans =~ s/(\A\s+|\s+\Z)//g; @hosts = split(/\s+/, $ans); } while(@hosts && defined($def = test_hostnames(@hosts))); \@hosts; } ## ## ## sub get_hostname { my($prompt,$def) = @_; my $host; while(1) { my $ans = Prompt($prompt,$def); $host = ($ans =~ /(\S*)/)[0]; last if(!length($host) || valid_host($host)); $def ="" if $def eq $host; print <<"EDQ"; *** ERROR: Hostname '$host' does not seem to exist, please enter again or a single space to clear any default EDQ } length $host ? $host : undef; } ## ## ## sub get_bool ($$) { my($prompt,$def) = @_; chomp($prompt); my $val = Prompt($prompt,$def ? "yes" : "no"); $val =~ /^y/i ? 1 : 0; } ## ## ## sub get_netmask ($$) { my($prompt,$def) = @_; chomp($prompt); my %list; @list{@$def} = (); MASK: while(1) { my $bad = 0; my $ans = Prompt($prompt) or last; if($ans eq '*') { %list = (); next; } if($ans eq '=') { print "\n",( %list ? join("\n", sort keys %list) : 'none'),"\n\n"; next; } unless ($ans =~ m{^\s*(?:(-?\s*)(\d+(?:\.\d+){0,3})/(\d+))}) { warn "Bad netmask '$ans'\n"; next; } my($remove,$bits,@ip) = ($1,$3,split(/\./, $2),0,0,0); if ( $ip[0] < 1 || $bits < 1 || $bits > 32) { warn "Bad netmask '$ans'\n"; next MASK; } foreach my $byte (@ip) { if ( $byte > 255 ) { warn "Bad netmask '$ans'\n"; next MASK; } } my $mask = sprintf("%d.%d.%d.%d/%d",@ip[0..3],$bits); if ($remove) { delete $list{$mask}; } else { $list{$mask} = 1; } } [ keys %list ]; } ## ## ## sub default_hostname { my $host; my @host; foreach $host (@_) { if(defined($host) && valid_host($host)) { return $host unless wantarray; push(@host,$host); } } return wantarray ? @host : undef; } ## ## ## getopts('dcho:i:'); $libnet_cfg_in = "libnet.cfg" unless(defined($libnet_cfg_in = $opt_i)); $libnet_cfg_out = "libnet.cfg" unless(defined($libnet_cfg_out = $opt_o)); my %oldcfg = (); $Net::Config::CONFIGURE = 1; # Suppress load of user overrides if( -f $libnet_cfg_in ) { %oldcfg = ( %{ local @INC = '.'; do $libnet_cfg_in } ); } elsif (eval { require Net::Config }) { $have_old = 1; %oldcfg = %Net::Config::NetConfig; } map { $cfg{lc $_} = $cfg{$_}; delete $cfg{$_} if /[A-Z]/ } keys %cfg; #--------------------------------------------------------------------------- if ($opt_h) { print <<EOU; $0: Usage: $0 [-c] [-d] [-i oldconfigile] [-o newconfigfile] [-h] Without options, the old configuration is shown. -c change the configuration -d use defaults from the old config (implies -c, non-interactive) -i use a specific file as the old config file -o use a specific file as the new config file -h show this help The default name of the old configuration file is by default "libnet.cfg", unless otherwise specified using the -i option, C<-i oldfile>, and it is searched first from the current directory, and then from your module path. The default name of the new configuration file is "libnet.cfg", and by default it is written to the current directory, unless otherwise specified using the -o option. EOU exit(0); } #--------------------------------------------------------------------------- { my $oldcfgfile; my @inc; push @inc, $ENV{PERL5LIB} if exists $ENV{PERL5LIB}; push @inc, $ENV{PERLLIB} if exists $ENV{PERLLIB}; push @inc, @INC; for (@inc) { my $trycfgfile = File::Spec->catfile($_, $libnet_cfg_in); if (-f $trycfgfile && -r $trycfgfile) { $oldcfgfile = $trycfgfile; last; } } print "# old config $oldcfgfile\n" if defined $oldcfgfile; for (sort keys %oldcfg) { printf "%-20s %s\n", $_, ref $oldcfg{$_} ? @{$oldcfg{$_}} : $oldcfg{$_}; } unless ($opt_c || $opt_d) { print "# $0 -h for help\n"; exit(0); } } #--------------------------------------------------------------------------- $oldcfg{'test_exist'} = 1 unless exists $oldcfg{'test_exist'}; $oldcfg{'test_hosts'} = 1 unless exists $oldcfg{'test_hosts'}; #--------------------------------------------------------------------------- if($have_old && !$opt_d) { $msg = <<EDQ; Ah, I see you already have installed libnet before. Do you want to modify/update your configuration (y|n) ? EDQ $opt_d = 1 unless get_bool($msg,0); } #--------------------------------------------------------------------------- $msg = <<EDQ; This script will prompt you to enter hostnames that can be used as defaults for some of the modules in the libnet distribution. To ensure that you do not enter an invalid hostname, I can perform a lookup on each hostname you enter. If your internet connection is via a dialup line then you may not want me to perform these lookups, as it will require you to be on-line. Do you want me to perform hostname lookups (y|n) ? EDQ $cfg{'test_exist'} = get_bool($msg, $oldcfg{'test_exist'}); print <<EDQ unless $cfg{'test_exist'}; *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** OK I will not check if the hostnames you give are valid so be very cafeful *** WARNING *** WARNING *** WARNING *** WARNING *** WARNING *** EDQ #--------------------------------------------------------------------------- print <<EDQ; The following questions all require a list of host names, separated with spaces. If you do not have a host available for any of the services, then enter a single space, followed by <CR>. To accept the default, hit <CR> EDQ $msg = 'Enter a list of available NNTP hosts :'; $def = $oldcfg{'nntp_hosts'} || [ default_hostname($ENV{NNTPSERVER},$ENV{NEWSHOST},'news') ]; $cfg{'nntp_hosts'} = get_host_list($msg,$def); #--------------------------------------------------------------------------- $msg = 'Enter a list of available SMTP hosts :'; $def = $oldcfg{'smtp_hosts'} || [ default_hostname(split(/:/,$ENV{SMTPHOSTS} || ""), 'mailhost') ]; $cfg{'smtp_hosts'} = get_host_list($msg,$def); #--------------------------------------------------------------------------- $msg = 'Enter a list of available POP3 hosts :'; $def = $oldcfg{'pop3_hosts'} || []; $cfg{'pop3_hosts'} = get_host_list($msg,$def); #--------------------------------------------------------------------------- $msg = 'Enter a list of available SNPP hosts :'; $def = $oldcfg{'snpp_hosts'} || []; $cfg{'snpp_hosts'} = get_host_list($msg,$def); #--------------------------------------------------------------------------- $msg = 'Enter a list of available PH Hosts :' ; $def = $oldcfg{'ph_hosts'} || [ default_hostname('dirserv') ]; $cfg{'ph_hosts'} = get_host_list($msg,$def); #--------------------------------------------------------------------------- $msg = 'Enter a list of available TIME Hosts :' ; $def = $oldcfg{'time_hosts'} || []; $cfg{'time_hosts'} = get_host_list($msg,$def); #--------------------------------------------------------------------------- $msg = 'Enter a list of available DAYTIME Hosts :' ; $def = $oldcfg{'daytime_hosts'} || $oldcfg{'time_hosts'}; $cfg{'daytime_hosts'} = get_host_list($msg,$def); #--------------------------------------------------------------------------- $msg = <<EDQ; Do you have a firewall/ftp proxy between your machine and the internet If you use a SOCKS firewall answer no (y|n) ? EDQ if(get_bool($msg,0)) { $msg = <<'EDQ'; What series of FTP commands do you need to send to your firewall to connect to an external host. user/pass => external user & password fwuser/fwpass => firewall user & password 0) None 1) ----------------------- USER user@remote.host PASS pass 2) ----------------------- USER fwuser PASS fwpass USER user@remote.host PASS pass 3) ----------------------- USER fwuser PASS fwpass SITE remote.site USER user PASS pass 4) ----------------------- USER fwuser PASS fwpass OPEN remote.site USER user PASS pass 5) ----------------------- USER user@fwuser@remote.site PASS pass@fwpass 6) ----------------------- USER fwuser@remote.site PASS fwpass USER user PASS pass 7) ----------------------- USER user@remote.host PASS pass AUTH fwuser RESP fwpass Choice: EDQ $def = exists $oldcfg{'ftp_firewall_type'} ? $oldcfg{'ftp_firewall_type'} : 1; $ans = Prompt($msg,$def); $cfg{'ftp_firewall_type'} = 0+$ans; $def = $oldcfg{'ftp_firewall'} || $ENV{FTP_FIREWALL}; $cfg{'ftp_firewall'} = get_hostname("FTP proxy hostname :", $def); } else { delete $cfg{'ftp_firewall'}; } #--------------------------------------------------------------------------- if (defined $cfg{'ftp_firewall'}) { print <<EDQ; By default Net::FTP assumes that it only needs to use a firewall if it cannot resolve the name of the host given. This only works if your DNS system is setup to only resolve internal hostnames. If this is not the case and your DNS will resolve external hostnames, then another method is needed. Net::Config can do this if you provide the netmasks that describe your internal network. Each netmask should be entered in the form x.x.x.x/y, for example 127.0.0.0/8 or 214.8.16.32/24 EDQ $def = []; if(ref($oldcfg{'local_netmask'})) { $def = $oldcfg{'local_netmask'}; print "Your current netmasks are :\n\n\t", join("\n\t",@{$def}),"\n\n"; } print " Enter one netmask at each prompt, prefix with a - to remove a netmask from the list, enter a '*' to clear the whole list, an '=' to show the current list and an empty line to continue with Configure. "; my $mask = get_netmask("netmask :",$def); $cfg{'local_netmask'} = $mask if ref($mask) && @$mask; } #--------------------------------------------------------------------------- ###$msg =<<EDQ; ### ###SOCKS is a commonly used firewall protocol. If you use SOCKS firewalls ###then enter a list of hostames ### ###Enter a list of available SOCKS hosts : ###EDQ ### ###$def = $cfg{'socks_hosts'} || ### [ default_hostname($ENV{SOCKS5_SERVER}, ### $ENV{SOCKS_SERVER}, ### $ENV{SOCKS4_SERVER}) ]; ### ###$cfg{'socks_hosts'} = get_host_list($msg,$def); #--------------------------------------------------------------------------- print <<EDQ; Normally when FTP needs a data connection the client tells the server a port to connect to, and the server initiates a connection to the client. Some setups, in particular firewall setups, can/do not work using this protocol. In these situations the client must make the connection to the server, this is called a passive transfer. EDQ if (defined $cfg{'ftp_firewall'}) { $msg = "\nShould all FTP connections via a firewall/proxy be passive (y|n) ?"; $def = $oldcfg{'ftp_ext_passive'} || 0; $cfg{'ftp_ext_passive'} = get_bool($msg,$def); $msg = "\nShould all other FTP connections be passive (y|n) ?"; } else { $msg = "\nShould all FTP connections be passive (y|n) ?"; } $def = $oldcfg{'ftp_int_passive'} || 0; $cfg{'ftp_int_passive'} = get_bool($msg,$def); #--------------------------------------------------------------------------- $def = $oldcfg{'inet_domain'} || $ENV{LOCALDOMAIN}; $ans = Prompt("\nWhat is your local internet domain name :",$def); $cfg{'inet_domain'} = ($ans =~ /(\S+)/)[0]; #--------------------------------------------------------------------------- $msg = <<EDQ; If you specified some default hosts above, it is possible for me to do some basic tests when you run 'make test' This will cause 'make test' to be quite a bit slower and, if your internet connection is via dialup, will require you to be on-line unless the hosts are local. Do you want me to run these tests (y|n) ? EDQ $cfg{'test_hosts'} = get_bool($msg,$oldcfg{'test_hosts'}); #--------------------------------------------------------------------------- $msg = <<EDQ; To allow Net::FTP to be tested I will need a hostname. This host should allow anonymous access and have a /pub directory What host can I use : EDQ $cfg{'ftp_testhost'} = get_hostname($msg,$oldcfg{'ftp_testhost'}) if $cfg{'test_hosts'}; print "\n"; #--------------------------------------------------------------------------- my $fh = IO::File->new($libnet_cfg_out, "w") or die "Cannot create '$libnet_cfg_out': $!"; print "Writing $libnet_cfg_out\n"; print $fh "{\n"; my $key; foreach $key (keys %cfg) { my $val = $cfg{$key}; if(!defined($val)) { $val = "undef"; } elsif(ref($val)) { $val = '[' . join(",", map { my $v = "undef"; if(defined $_) { ($v = $_) =~ s/'/\'/sog; $v = "'" . $v . "'"; } $v; } @$val ) . ']'; } else { $val =~ s/'/\'/sog; $val = "'" . $val . "'" if $val =~ /\D/; } print $fh "\t'",$key,"' => ",$val,",\n"; } print $fh "}\n"; $fh->close; ############################################################################ ############################################################################ exit 0; __END__ :endofperl