Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 15 Feb 2012 09:01:47 -0500
From: "aprivater@...il.com" <aprivater@...il.com>
To: john-users@...ts.openwall.com
Subject: Re: sha1 + hex salt

Solar Designer wrote:
> On Wed, Feb 15, 2012 at 12:39:05AM -0500, aprivater@...il.com wrote:
>> is john supports sha1 bruteforce with a hex salt?
> 
> As far as I'm aware, there's currently no easy way to specify salts in
> hex, except in some special cases (the XSHA format happens to be almost
> right for your case - but see below).
> 
>> sha1:20c59472b34ec4b9678b7149d519a2338bc31ba9   salt:00000000
>> password is 92086390
> 

this is pl script do the job, but it takes about 15min to complete on 
average computer with no gpu, is any way to speed it up?
how can i convert it to asm or c? thank you

#!/usr/bin/env perl

use strict;
use warnings;
use Digest::SHA qw (sha1_hex);

my $max = 99999999;

my $target = $ARGV[0] or die ("usage: $0 hash\n");

for (my $i = 0; $i < $max; $i++)
{
   printf ("%4.1f%%\n", ($i / $max) * 100) if (($i % 100000) == 0);

   my $plain = sprintf ("%08d\0\0\0\0\0\0\0\0", $i);

   my $hash = sha1_hex ($plain);

   if ($hash eq $target)
   {
     print $i, "\n";

     exit;
   }
}

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.