📄 authserver.htm
字号:
<html>#!/usr/local/bin/perl######################################################################## This script is a wrapper for the java AuthServer.class # It's purpose is to feed the right arguments into the# AuthServer and also to accept passwords on the command line.# This could be done from within the java AuthServer but because# perl handles command line arguments and the underline system# much more elegantly, I decided to do it like this.# # # Christoforos Pirillos @ Villanova University - May 1999#######################################################################$working_dir="/nfs/vlsi/pirillos/ece9030";if (@ARGV !=2) {&usage; exit;}#if the -user argument is given, accept the password and update the#databaseif (@ARGV[0] eq "-user" ) { chdir "$working_dir"; system "stty -echo"; print "Password: "; chop ($passwd1=<STDIN>); print "\nRetype Password: "; chop ($passwd2=<STDIN>); if ("$passwd1" ne "$passwd2") { print "\nPlease give the same password next time..\n"; system "stty echo"; exit; } system "stty echo"; print "\n"; $username = @ARGV[1]; print "Updating password entry for user $username...\n"; exec("java encryption.AuthServer -user $username $passwd2");}#if a port and seed text are given, start the server#make sure you feed in a long enough seed text....$seed=@ARGV[1]."uivrnviueprniupr3829nufir892vn9ur94324f342df5345treetrevn498";print "Starting AuthServer at port @ARGV[0]..\n";chdir "$working_dir";exec ("java encryption.AuthServer @ARGV[0] $seed");sub usage {print "Usage:\n"; print " AuthServer <port> <seed text>\n";print "or AuthServer -user <username>\n\n";print "port -the port number that the server will be listening to\n";print "seed text -the seed text to feed to the random key generator\n";print "username -a new username to be added into the database with\n";print " authorized users. You will be prompted for a password.\n"; print "\n";}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -