01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/perl -wT
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header;
print <<"EOF";
Content-Type:text/html
<html>
<head><title>Rechner</title></head>
<body>
EOF
my $x = $cgi->param('x');
my $y = $cgi->param('y');
my $z = $x + $y;
unless ($x =~ /^[\w .!?-]+$/ ){die;} # "Hacker"
ausfiltern
unless ($y =~ /^[\w .!?-]+$/ ){die;} # "Hacker"
ausfiltern
print "$x + $y = $z";
print "</body>\n</html>";
|