gecko-dev/webtools/bonsai/trapdoor
kiko%async.com.br 4f52134c24 Fix for bug 128747: Bonsai should be made architecture independent.
Convert trapdoor to being a perl file that uses builtin crypt(), and
fix pretty much everything that treated it specially. We now no longer
depend on gcc or anything else. Also fixes by consequence bug 263242,
How about if trapdoor didn't SEGV with no arguments?  which caused me
much embarassment this week. r=cls.
2004-10-08 01:06:46 +00:00

11 lines
305 B
Perl
Executable File

#!/usr/bonsaitools/bin/perl -wT
if (!defined $ARGV[0]) {
print "Usage: trapdoor PASSWORD\n";
exit 2;
}
# XXX We are using salt as 'aa' for now, but ideally it should be
# something like:
# chr(int (rand 26) + 65) . chr(int (rand 26) + 65);
my $salt = 'aa';
print crypt($ARGV[0], $salt) . "\n";