#!/usr/bin/perl use CGI ':standard'; use Net::FTP; BEGIN { #flush STDOUT immediately $| = 1; print header(-type=>'text/html'); } $session=rand($numbers=1000); open STDERR, ">tmp/$session.txt"; if ($ENV{REQUEST_METHOD} ne "POST") { exit; } $username = param('username'); $password = param('password'); $target = param('target'); $url = param('lastvisit'); $this = param('this_'); $directory = param('dir'); use LWP::Simple; getstore("$url","tmp/$this"); &do_work; sub do_work { use Net::FTP; $ftp = Net::FTP->new("$target",Debug=>1); $ftp->login("$username","$password"); $ftp->cwd("$directory"); if (param('type') eq "binary") { $ftp->type("I"); } elsif (param('type') eq "ascii") { $ftp->type("A"); } $ftp->put("tmp/$this","$this"); if($this=~/.+\.pl|.+\.cgi/ig) { $ftp->site(CHMOD,755,"$this"); } $ftp->size("$this"); $ftp->quit; } sub finish_up { unlink("tmp/$this"); unlink("tmp/$session.txt"); } close STDERR; &show_data; sub show_data { print qq!

U p L o a d e r vš

!; open(DATA,") { foreach($_=~/Net.*FTP=.*\)(.*)/ig) { $temp=$1; ($temp=~s/([A-Z]+[A-Z]+[A-Z].*)/$1<\/FONT>/g); ($temp=~s/(user\s.*)/$1<\/strong>/g); ($temp=~s/213(.*)/$1 BYTES<\/FONT>/g); print qq!

  • $temp!; } } } print "

    Your transaction is complete..


    "; &finish_up; exit;