Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 1 Mar 2012 00:47:51 +0400
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: rule: >NN  , format=cuda-mscash, filters, --make-charset segfault

On Wed, Feb 29, 2012 at 07:26:25PM +0100, buawig@...il.com wrote:
> b) I would be interested in a filter that match the following
> characteristics:
> - 3 out of 4 character classes are used
> - minimum length check

Here you are:

[List.External:Policy3of4]
int mask[0x100];

void init()
{
	int c;

	c = 0;
	while (c < 0x100)
		mask[c++] = 0x100;

	c = 'a';
	while (c <= 'z')
		mask[c++] = 1;
	c = 'A';
	while (c <= 'Z')
		mask[c++] = 2;
	c = '0';
	while (c <= '9')
		mask[c++] = 4;
}

void filter()
{
	int i, c, set_mask, seen_mask, seen_count;

	i = seen_mask = seen_count = 0;
	while (c = word[i++]) {
		seen_count += !(seen_mask & (set_mask = mask[c]));
		seen_mask |= set_mask;
		if (seen_count < 3)
			continue;

		while (i < 8) {
			if (word[i++])
				continue;
			word = 0; // Reject
			return;
		}

		return; // Accept
	}

	word = 0; // Reject
	return;
}

> ver: 1.7.9-jumbo-5_mpi [linux-x86-64-cuda]
> 
> CHARSET_MAX			0xFF
> CHARSET_LENGTH			16
> 
> 
> [host:02589] *** Process received signal ***
> [host:02589] Signal: Segmentation fault (11)

Did you do a "make clean" before re-building with these changed
settings?  If not, please try that and report back.

Does the segfault occur on --make-charset or on --incremental or on
some other invocation?  Please provide more detail.

Alexander

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.