encpass.pl
来自「动态域名解决方案。类似windows下的花生壳。代码用perl编写」· PL 代码 · 共 54 行
PL
54 行
#!/usr/bin/perl###################################################### encpass.pl## This script takes a plain text password# provided as an argument, encrypts it and# prints it.## See COPYING for licensing information####################################################### PERL packages and optionsuse strict;use FindBin;# try for compiled MD5, otherwise use pure PerlBEGIN { eval { require Digest::MD5; import Digest::MD5 'md5_hex' }; if ($@) { # ups, no Digest::MD5 # get path to our parent directory my $binpath = $FindBin::Bin; my $gnudipdir = ''; if ($binpath =~ /(.*)\/.+?/) { $gnudipdir = $1; } require $gnudipdir . '/lib/Digest/Perl/MD5.pm'; import Digest::Perl::MD5 'md5_hex' } }# get program namemy $pgm = $0;if ($pgm =~ /^.*\/(.+?)$/) { $pgm = $1;}sub usage { print STDOUT "usage: $pgm password\n"; print STDERR "usage: Encrypt a plain text password.\n"; exit;}if (@ARGV ne 1) { usage();}my $plainpass = shift;my $encpass = md5_hex($plainpass);print "$encpass\n";
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?