From: Heinz Diehl <htd@fancy-poultry.org>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Crack a dm-LUKS partition or harddisk
Date: Thu, 5 Nov 2009 23:03:25 +0100 [thread overview]
Message-ID: <20091105220325.GA12208@fancy-poultry.org> (raw)
In-Reply-To: <20091105204220.A3F847BD70@ws5-10.us4.outblaze.com>
On 05.11.2009, Si St wrote:
> For my wireless router I double the character count to 32.
You can safely use up to 63 characters. To set up wireless AP, I use this
little script I hacked together quite some time ago, it works very well.
It generates passwords in the correct character range for wireless AP
using /dev/random. Save this in a file, do a "chmod +x " on it, and run
it with the desired length as argument. In case it is a large passphrase
you want to generate, you'll have to move the mouse a bit.
#!/usr/bin/perl -Tw
use strict;
my $randkey;
my $iter;
my $howmany;
$howmany = $ARGV[0];
$randkey = &gen_randkey;
if ($randkey) {
print "Passphrase: $randkey\n"; }
else {
print "Something went wrong\n";
}
sub gen_randkey {
my $keylength = $howmany;
my $len = shift; $len = $keylength unless $len;
my @range; @range = (33..126);
my $id = &read_dev_random($len);
return unless $id;
$id =~ s/(.)/chr($range[ord($1) % $#range+1])/esg;
return $id;
}
sub read_dev_random {
my $len = shift;
unless ($len) { print STDERR "No parameter given\n"; return; }
eval {
open(RANDOM, "/dev/random") or die; };
if ($@) { print STDERR "Unable to open the random device\n"; return; }
my $random;
unless (read(RANDOM, $random, $len) == $len) {
print STDERR "Unable to read from the random device\n"; return;
}
close(RANDOM);
return $random;
}
next prev parent reply other threads:[~2009-11-05 22:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-05 20:42 [dm-crypt] Crack a dm-LUKS partition or harddisk Si St
2009-11-05 21:34 ` Heinz Diehl
2009-11-05 22:03 ` Heinz Diehl [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-11-06 17:28 Si St
2009-11-06 18:27 ` Heinz Diehl
2009-11-06 19:29 ` Arno Wagner
2009-11-05 21:49 Si St
2009-11-05 22:08 ` Heinz Diehl
2009-11-06 8:08 ` Luca Berra
2009-11-06 12:07 ` Heinz Diehl
2009-11-04 16:51 Si St
2009-11-04 17:01 ` Sven Eschenberg
2009-11-04 17:30 ` Heinz Diehl
2009-11-04 22:29 ` Arno Wagner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091105220325.GA12208@fancy-poultry.org \
--to=htd@fancy-poultry.org \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.