Help for this page

Select Code to Download


  1. or download this
    $ cat taint_test.pm
    package taint_test;
    ...
    use warnings;
    
    chdir +(split /:/, $ENV{PATH})[0];
    
  2. or download this
    $ cat check_taint_1.pl
    use strict;
    ...
    $ENV{PATH} = '/bin:/usr/bin';
    use lib '.';
    use taint_test;
    
  3. or download this
    $ perl -T check_taint_1.pl
    Insecure dependency in chdir while running with -T switch at taint_tes
    +t.pm line 6.
    Compilation failed in require at check_taint_1.pl line 6.
    BEGIN failed--compilation aborted at check_taint_1.pl line 6.
    $
    
  4. or download this
    $ cat check_taint_2.pl
    use strict;
    ...
    BEGIN { $ENV{PATH} = '/bin:/usr/bin'; }
    use lib '.';
    use taint_test;
    
  5. or download this
    $ perl -T check_taint_2.pl
    $
    
  6. or download this
    $ cat check_taint_3.pl
    use strict;
    ...
    use lib '.';
    use taint_test;
    BEGIN { $ENV{PATH} = '/bin:/usr/bin'; }
    
  7. or download this
    $ perl -T check_taint_3.pl
    Insecure dependency in chdir while running with -T switch at taint_tes
    +t.pm line 6.
    Compilation failed in require at check_taint_3.pl line 5.
    BEGIN failed--compilation aborted at check_taint_3.pl line 5.
    $