📄 date_lookup_insecure.cgi
字号:
#!/usr/bin/perl -wT##WARNINGThis warning is here to prevent this script from compiling sinceyou really should NOT be using this on a production web server.If you want to experiment on a private web server, remove this warning##use strict;use CGI;use CGIBook::Error;my $q = new CGI;my @missing;my $month = $q->param( "month" ) or push @missing, "month";my $year = $q->param( "year" ) or push @missing, "year";my $key = quotemeta( $q->param( "key" ) ) or push @missing, "key";if ( @missing ) { my $fields = join ", ", @missing; error( $q, "You left the following required fields blank: $fields." );}local *FILE;## This is INSECURE unless you first check the validity of $year and $monthopen FILE, "/usr/local/apache/data/$year/$month" or error( $q, "Invalid month or year" );print $q->header( "text/html" ), $q->start_html( "Results" ), $q->h1( "Results" ), $q->start_pre;while (<FILE>) { print if /$key/;}print $q->end_pre, $q->end_html;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -