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

📄 check.pl

📁 伯克利做的SFTP安全文件传输协议
💻 PL
字号:
#!/usr/bin/perl -w# verify a SafeTP builduse strict 'subs';sub run;if (@ARGV >= 1) {  # any argument skips the standalone tests}else {  # run the standalone test programs  foreach $prog (qw(datablok tsint sdsa selgamal tdes tsha texcept		    crc blokutil nonport tpool sockutil)) {    run("./$prog");      # bugfix: had been assuming that "." was in cwd  }}# use a temporary directory for keys, since they will be# relatively weak$ENV{"SAFETP_CONFIG"} = "./weak.keys";# remove the existing keys (if any)system("rm -rf weak.keys");# create the keys (does not get entropy -- creates weak keys)run("echo test server | ./makekeys 512 512 0");# run the big testrun("./provider");# done!exit(0);sub run {  my ($cmd) = @_;  print("executing: $cmd\n");                my $log = "check.pl.out";  open(OUT,">>$log") or die;  print OUT ("----------------- output of $cmd --------------\n");  close(OUT) or die;  if (system("$cmd >> $log 2>&1") != 0) {    print("$cmd failed.\n",          "This probably needs to be fixed for\n",          "SafeTP to run successfully.  You may be able to\n",          "learn more about why it failed by looking at\n",          "its output, which is at the end of $log .\n");    exit(2);  }}

⌨️ 快捷键说明

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