mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:33:37 +03:00
Added FTP_SKIP_PASV_IP and --ftp-skip-pasv-ip
This commit is contained in:
parent
56d9624b56
commit
7e845e7cfd
11 changed files with 117 additions and 9 deletions
|
|
@ -70,6 +70,7 @@ sub ftpmsg {
|
|||
}
|
||||
|
||||
my $verbose=0; # set to 1 for debugging
|
||||
my $pasvbadip=0;
|
||||
my $retrweirdo=0;
|
||||
my $retrnosize=0;
|
||||
my $srcdir=".";
|
||||
|
|
@ -564,7 +565,11 @@ sub PASV_command {
|
|||
|
||||
if($cmd ne "EPSV") {
|
||||
# PASV reply
|
||||
sendcontrol sprintf("227 Entering Passive Mode (127,0,0,1,%d,%d)\n",
|
||||
my $p="127,0,0,1";
|
||||
if($pasvbadip) {
|
||||
$p="1,2,3,4";
|
||||
}
|
||||
sendcontrol sprintf("227 Entering Passive Mode ($p,%d,%d)\n",
|
||||
($pasvport/256), ($pasvport%256));
|
||||
}
|
||||
else {
|
||||
|
|
@ -703,6 +708,10 @@ sub customize {
|
|||
logmsg "FTPD: instructed to use RETRNOSIZE\n";
|
||||
$retrnosize=1;
|
||||
}
|
||||
elsif($_ =~ /PASVBADIP/) {
|
||||
logmsg "FTPD: instructed to use PASVBADIP\n";
|
||||
$pasvbadip=1;
|
||||
}
|
||||
elsif($_ =~ /NOSAVE/) {
|
||||
# don't actually store the file we upload - to be used when
|
||||
# uploading insanely huge amounts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue