IP : 18.216.17.239Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
./
../
../
home4/
../
sbin/
../
lib64/
../
bin/
libnetcfg/
/
#!/usr/bin/perl eval 'exec /usr/bin/perl -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.
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.
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.
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
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>
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
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);
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) ?"; }
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.