pwgen.pl
changeset 0 624a9ab34425
child 3 d4bb4405d439
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pwgen.pl	Wed May 07 16:25:00 2014 +0200
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+# $Id$
+# (c)Peter Gervai, 2002; Released under GPLv2 + CC_BY-SA-2.0
+#
+# jelszogenerator, 2002/04/08
+#
+
+if( $ARGV[0] =~ /shutup/i ) { $shutup = 1; $num=1; } else { $num = 6; }
+
+$vowel='aeiou';
+#$cons='bcdfghjklmnpqrstvwxyz';
+ $cons='bcdfghjklmnprstvxyz';
+
+$vlen=length($vowel);
+$clen=length($cons);
+
+
+$longsyl=20; # percent
+$sylnum=4 + rand(3);
+
+print "$num tok jo jelszo: " unless $shutup;
+
+
+
+for (1..$num) {
+    for my $i (1..$sylnum) {
+        print substr($cons,rand($clen),1);
+        print substr($vowel,rand($vlen),1);
+        print substr($cons,rand($clen),1) if $longsyl > rand(100);
+        #print "-";
+    }
+    print "  " unless $shutup;
+}
+
+print "\n";
+print "\n" unless $shutup;