Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Security techniques every programmer should know

by fizbin (Chaplain)
on Dec 30, 2004 at 15:41 UTC ( #418279=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # $page and $section are parameters from the user that have been clean
    +ed of 0 bytes and obvious control characters
      my $mantext = ''; my $status;
    ...
        else {exec('/usr/bin/man', $page);}
      }
    # now reformat $mantext and display it.
    
  2. or download this
      section=-P/usr/bin/whatever%20command%20I%20want&page=cat
    
  3. or download this
    # $page and $section are parameters from the user that have been clean
    +ed of 0 bytes and obvious control characters
      my $mantext = ''; my $status;
    ...
        else {exec('/usr/bin/man', '--', $page);}
      }
    # now reformat $mantext and display it.
    
  4. or download this
      my $qpage = quotemeta($page);
      my $qsect = quotemeta($section || '');
      exec("/usr/bin/man $qsect $qpage");
    
  5. or download this
    --
    @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
    map{y/X_/\n /;print}map{pop@$_}@/for@/
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://418279]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2015-07-06 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls