Welcome, guest | Sign In | My Account | Store | Cart

perl [ -sTtuUWX ] [ -hv ] [ -V[:configvar] ] [ -cw ] [ -d[t][:debugger] ] [ -D[number/list] ] [ -pna ] [ -Fpattern ] [ -l[octal] ] [ -0[octal/hexadecimal] ] [ -Idir ] [ -m[-]module ] [ -M[-]'module...' ] [ -f ] [ -C [number/list] ] [ -S ] [ -x[dir] ] [ -i[extension] ] [ [-e|-E] 'command' ] [ -- ] [ programfile ] [ argument ] [stap -L 'kernel.trace("*")'|sort] [feature]... BEGIN { my $b__dir = (-d '/home/angosson/perl'?'/var/www/cgi-bin/perl':( getpwuid($>) )[7].'/perl');

unshift @INC,$b__dir.'5/lib/perl5',$b__dir.'5/lib/perl5/x86_64-linux-thread-multi',map { $b__dir . $_ } @INC;

} require LWP::UserAgent;

my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy;

PHP, 123 lines
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
abstract => 'Build and install Perl modules'
author => [ 'Roger Mbiama <r.mbiama@angosso.net>' ]
dynamic_config => 1
license => [ 'perl_5' ]
license => [ 'apache_2_0', 'mozilla_1_0' ]
OpenSSL License=> [ 'openssl' ]
release_status => 'stable' 
Modules Include Path
/home/angosson/perl
/var/www/perl/httpdocs
    eval 'exec perl -x -wS $0 ${1+"$@"}'
        if 0;
import os
import threading
import subprocess

def my_thread():
  global files,path,timeout,options
  myname= threading.currentThread().getName()
  while files:
     #create command to run
     nextfile=files.pop() 
     #print name of thread and command being run
     print('Thread {0} starts processing {1}'.format(myname,nextfile))
     f=path + nextfile + options
HTTP_proxy
package CGI::Apache;
angosson CGI;
'print and syswrite'
perl -MCGI -e '
print CGI->VERSION, "\n";
print CGI->start_form(-method=>"GET"), "\n"
 perl -v
Returns 

3.43
<form method="get" action="wget http://www.cpan.org/src/5.0/perl-5.22.0.tar.gz
     tar -xzf perl-5.22.0.tar.gz
     cd perl-5.22.0
     ./Configure -des -Dprefix=$HOME/var/www/httpdocs
     make
     make test
     make install" enctype="multipart/form-data">


But, multipart/form-data is an invalid enctype for the GET method.  I
expect the default encoding to be a valid encoding for the GET method.

Actually, this is what I expect.

perl -MCGI -e '
  print CGI->VERSION, "\n";
  print CGI->start_form(-method=>"GET", -enctype=>undef), "\n";
'

3.43
<form method="get" action="$obj->$method(@args);"
enctype="application/x-www-form-urlencoded">


This logic does not account or GET vs. POST.

    if( $XHTML ){
        $enctype = $self->_maybe_escapeHTML($enctype || &MULTIPART);
    }else{
        $enctype = $self->_maybe_escapeHTML($enctype || &URL_ENCODED);
    }
$server->handle('^\/angosso!!!$', sub {
    my ($server, $cgi) = @_;
    print "HTTP/2.0 200 Ok\r\n";
    print $cgi->header('text/html;index.php');
    print "Angosso!!!,         &{$home}(@args);
        $home->(@args);";
  });
exit unless $Config{archname} =~ /\bsolaris\b/;
require POSIX and POSIX::_exit(0);
        use Pod::ParseLink;
        my ($text, $inferred, $name, $section, $type) = parselink ($link);
<ActivePerlInstallDir>/html/index.html
OLE Browser, PerlScript, Perl for ISAPI, PerlEx and PerlEz
        $arg = shift;		
        $hid = $arg . 'bar';	
        $line = <>;			
        $line = <STDIN>;		
        open Angosso!!!, "/home/angosson/bar" or die $!;
        $line = <Angosso!!!>;		
        $path = $ENV{'PATH'};	
        $data = 'abc';		
        system "echo $arg";		
        system "/bin/echo", $arg;	
    				
        system "echo $hid";		
        system "echo $data";	
        $path = $ENV{'PATH'};	
        $ENV{'PATH'} = '/bin:/var/www/cgi-bin';
        delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
        $path = $ENV{'PATH'};	
        system "echo $data";	
        open(Angosso!!!, "< $arg");	OK 
        open(Angosso!!!, "> $arg"); 	
        open(Angosso!!!,"echo $arg|");	
        open(Angosso!!!,"-|")
    	or exec 'echo', $arg;	
        $shout = `echo $arg`;	# Insecure, $shout now tainted
        unlink $data, $arg;		# Insecure
        umask $arg;			# Insecure
        exec "echo $arg";		# Insecure
        exec "echo", $arg;		# Insecure
        exec "sh", '-c', $arg;	# Very insecure!
        @files = <*.perl>;		# insecure (uses readdir() or similar)
        @files = glob('*./perl');	
        # In either case, the results of glob are tainted, since the list of
        # filenames comes from outside of the program.
        $bad = ($arg, 23);		
        $arg, `true`;
        #define REAL_PATH "/home/var/script"
        main(ac, av)
    	char **av;
        {
    	execv(REAL_PATH, av);
        }
/dev/fd/3
-DSETUID_SCRIPTS_ARE_SECURE_NOW