Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.43 KB | None | 0 0
  1. if($ENV{'REQUEST_METHOD'} =~ m/post/i){
  2. read(STDIN, $L, $ENV{'CONTENT_LENGTH'});
  3. @c = split(/&/, $L);
  4. foreach (@c) {
  5.   ($v, $d) = split(/=/, $_);
  6.   @RAWconfig = split(/\n/, decode($d)) if $v eq 'config';
  7.   $httpheader="Content-type:text/html\n";
  8.   $httpheader.="Content-disposition: attachment; filename=audit$date.html\n" if $v eq 'forcedownload' and $d eq 'true';
  9.   $audit = $d if $v eq 'audit';
  10. }
  11. }
  12. else{@RAWconfig=<STDIN>;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement