Leser: 3
1 Eintrag, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/perl -T use strict; use warnings; use CGI; use CGI::Carp qw/fatalsToBrowser/; use Scalar::Util qw(tainted); my $q = new CGI; print $q->header; print "PID: ",$q->b($$); print $q->br; my $cmd = $q->param('cmd'); if (tainted($cmd)) { print $q->b('$cmd is tainted'); } print $q->br; print "Taint Mode aktiv: ${^TAINT}"; print $q->end_html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/perl -T use strict; use warnings; use CGI::Fast; use CGI::Carp qw/fatalsToBrowser/; use Scalar::Util qw(tainted); while (my $q = new CGI::Fast) { print $q->header; print "PID: ",$q->b($$); print $q->br; my $cmd = $q->param('cmd'); if (tainted($cmd)) { print $q->b('$cmd is tainted'); } print $q->br; print "Taint Mode aktiv: ${^TAINT}"; print $q->end_html; }
1 Eintrag, 1 Seite |