File: pass.pl

package info (click to toggle)
madoka 4.2.3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 960 kB
  • ctags: 45
  • sloc: perl: 1,006; makefile: 45; sh: 4
file content (23 lines) | stat: -rwxr-xr-x 500 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/perl
#
#  password crypt tool for madoka-chan 4.2
#
#      Copyright(c)2000- cookie (cookie@madoka.org)
#                        The madoka project
#      This is free software.

require 5.003;

$c = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_./';
for (1..2) {
  $s .= substr($c, int(rand(length($c))) ,1);
}
print "Input your madoka password: ";
while (1) {
  $p .= getc;
  last if $p =~ /\n$/;
}
chomp($p);
$b = crypt($p, $s);
print "crypted password:\n";
print "$b\n";