figlet_insecure.cgi
来自「嵌入式WEB」· CGI 代码 · 共 35 行
CGI
35 行
#!/usr/bin/perl -w##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;# Constant: path to figletmy $FIGLET = '/usr/local/bin/figlet';my $q = new CGI;my $string = $q->param( "string" );unless ( $string ) { error( $q, "Please enter some text to display." );}local *PIPE;## This code is INSECURE...## Do NOT use this code on a live web server!!open PIPE, "$FIGLET \"$string\" |" or die "Cannot open pipe to figlet: $!";print $q->header( "text/plain" );print while <PIPE>;close PIPE;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?