create_db.pl

来自「一个功能强大的开源弱口令猜解程序」· PL 代码 · 共 39 行

PL
39
字号
#!/usr/bin/perlif ( @ARGV != 2 ) {	print "Usage:  \n";	print " create_db.pl <type> <inputfile>\n\n";	print "type is p for passwords, l for username/login\n\n";	exit;} else {	$type = shift;	$file = shift;}if ( $type eq "p" ){ $typeid = "PASS"; }if ( $type eq "l" ){ $typeid = "LOGI"; }open (DAT, ">output.tpdb");print DAT "file\n filename = \"prutus_$typeid\";\n";print DAT " attrib = backup;\n";print DAT " typeid = '$typeid';\n";print DAT " creatorid = 'PRUT';\n\n";print DAT "begin\n\n";open ($input, $file);while (<$input>) {	print DAT " record\n begin\n";	chomp($_);	print DAT "  \"$_\"\n";	print DAT " end;\n\n";}print DAT "end;\n";close (DAT);close ($input);print "Use pdbc to create the .pdb file\n\n";

⌨️ 快捷键说明

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