⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nistnet-distribution.pl

📁 一个在linux环境下模拟网络损伤的软件
💻 PL
字号:
#!/usr/local/bin/perl -- -*-perl-*-# ------------------------------------------------------------# Form-mail.pl, by Reuven M. Lerner (reuven@the-tech.mit.edu).## Last updated: March 14, 1994## Form-mail provides a mechanism by which users of a World-# Wide Web browser may submit comments to the webmasters# (or anyone else) at a site.  It should be compatible with# any CGI-compatible HTTP server.# # Please read the README file that came with this distribution# for further details.# ------------------------------------------------------------# ------------------------------------------------------------# This package is Copyright 1994 by The Tech. # Form-mail is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 2, or (at your option) any# later version.# Form-mail is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU# General Public License for more details.# You should have received a copy of the GNU General Public License# along with Form-mail; see the file COPYING.  If not, write to the Free# Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.# ------------------------------------------------------------# Define fairly-constants# This should match the mail program on your system.$mailprog = '/usr/lib/sendmail';$recipient = 'mark.carson\@nist.gov';# Print out a content-type for HTTP/1.0 compatibilityprint "Content-type: text/html\n\n";# Print a title and initial headingprint "<html>\n";print "<Head>\n";print "<Title>NIST Net distribution</Title></Head>\n";print "<body bgcolor=white>\n";print "<h3>\n";print "<img src=\"http://www.antd.nist.gov/itg/nistnet/nistnetlogo.gif\" width=135 height=26 alt=\"NIST Net\"> Dowload Page\n";print "</h3>\n";print "To get the source and documentation\n";print "<ul>\n";print "<li><a href=\"ftp://cabbit.ncsl.nist.gov/pub/nistnet/nistnet.tar.gz\"><b>Click here (gzipped tar file, 157K)</b></a> <b>(nistnet.tar.gz)</b>\n";print "</ul>\n";print "If you're lucky, you may be able to use:\n";print "<ul>\n";print "<li><a href=\"ftp://cabbit.ncsl.nist.gov/pub/nistnet/nistnet.o\">\n";print "this precompiled binary kernel module (17K)</a> <b>(nistnet.o)</b>\n";print "<li><a href=\"ftp://cabbit.ncsl.nist.gov/pub/nistnet/nistnet\">\n";print "and this precompiled version of the user interface (221K)</a> <b>(nistnet)</b>\n";print "</ul>\n";print "<HR>\n";# Get the inputread(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});# Split the name-value pairs@pairs = split(/&/, $buffer);foreach $pair (@pairs){    ($name, $value) = split(/=/, $pair);    # Un-Webify plus signs and %-encoding    $value =~ tr/+/ /;    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;    # Stop people from using subshells to execute commands    # Not a big deal when using sendmail, but very important    # when using UCB mail (aka mailx).    # $value =~ s/~!/ ~!/g;     # Uncomment for debugging purposes    # print "Setting $name to $value<P>";    $FORM{$name} = $value;}# Now send mail to $recipientopen (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n";print MAIL "From: $FORM{'username'}\n";print MAIL "Reply-to: $FORM{'username'}\n";print MAIL "Subject: NIST Net request (Forms submission)\n";print MAIL "X-Sort-Key: NISTNet\n\n";print MAIL "---------------------------------------------------\n";print MAIL "Email address: $FORM{'username'}\n";print MAIL "Organization: $FORM{'organization'}\n";print MAIL "Intent: $FORM{'intent'}\n";print MAIL "Comments: $FORM{'comments'}\n";print MAIL "---------------------------------------------------\n";close (MAIL);# &end_document;sub end_document{print "<hr>\n";print "Comments? Questions? Mail me at\n";print "<a href=\"mailto:mark.carson\@nist.gov\">mark.carson\@nist.gov</a>.\n"; print "<hr>\n";print "<a href=\"http://www.antd.nist.gov/itg/nistnet/index.html\">[\n";print "<img src=\"http://www.antd.nist.gov/itg/nistnet/nistnetlogo.gif\" width=135 height=26 alt=\"NIST Net\">\n";print "Home Page]</a>\n";print "<a href=\"http://www.antd.nist.gov/itg/nistnet/install.html\">[Installing NISTNet]</a>\n";print "<a href=\"http://www.antd.nist.gov/itg/nistnet/usage.html\">[Using NISTNet]</a>\n";print "<a href=\"http://www.antd.nist.gov/itg/nistnet/faq.html\">[NISTNet FAQ]</a>\n";print "</body>\n";print "</html>\n";}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -