Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 20 Oct 2006 01:38:59 +0400
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: combining multiple words

On Thu, Oct 19, 2006 at 12:47:29PM +0200, websiteaccess wrote:
>  I would like john do
> 
> fat+bob  -> fatbob
> fat+big   -> fatbig
> fat+house  -> fathouse
> bob+fat  ->bobfat
> bob+big  -> bobbig
> etc....
> 
>  Is john can do that ?

No.  Wordlist rules operate on individual input words, not on pairs of
words.  (As an exception, there are some rules specific to "single
crack" mode that do operate on pairs of input words - e.g., on someone's
first and last names.)

Attached (as text/plain - this is important for some web-based archives)
are three trivial Perl scripts that can do roughly what you need -
combining two, three, or four input words, respectively.  You can
redirect the output of one of those scripts either into a "john --stdin"
or into a file (and use that as a wordlist with John).  Obviously, this
approach is only reasonable with tiny wordlists - e.g., with John's
default password.lst and/or with English/1-tiny/ wordlists from the
Openwall collection.

-- 
Alexander Peslyak <solar at openwall.com>
GPG key ID: 5B341F15  fp: B3FB 63F4 D7A3 BCCC 6F6E  FC55 A2FC 027C 5B34 1F15
http://www.openwall.com - bringing security into open computing environments

Was I helpful?  Please give your feedback here: http://rate.affero.net/solar

#!/usr/bin/perl

while (<>) {
	chop;
	$w[$#w + 1] = $_;
}

foreach $a (@w) {
	foreach $b (@w) {
		print "$a$b\n";
		print "$a $b\n";
	}
}

#!/usr/bin/perl

while (<>) {
	chop;
	$w[$#w + 1] = $_;
}

foreach $a (@w) {
	foreach $b (@w) {
		$ab = "$a$b";
		$a_b = "$a $b";
		foreach $c (@w) {
			print "$ab$c\n";
			print "$a_b $c\n";
		}
	}
}

#!/usr/bin/perl

while (<>) {
	chop;
	$w[$#w + 1] = $_;
}

foreach $a (@w) {
	foreach $b (@w) {
		$ab = "$a$b";
		$a_b = "$a $b";
		foreach $c (@w) {
			$abc = "$ab$c";
			$a_b_c = "$a_b $c";
			foreach $d (@w) {
				print "$abc$d\n";
				print "$a_b_c $d\n";
			}
		}
	}
}


-- 
To unsubscribe, e-mail john-users-unsubscribe@...ts.openwall.com and reply
to the automated confirmation request that will be sent to you.

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ