Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 May 2015 18:40:10 +0300
From: Aleksey Cherepanov <lyosha@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: displaying full meta information about hashes with
 --show=types

On Mon, May 11, 2015 at 02:40:27AM +0300, Aleksey Cherepanov wrote:
> While I intended to make code that prints something for each line of
> input file, the code skips bare lines of length < 13 when they consist
> of letters.
> 
> Fro instance: abcdefghijkl
> 
> These are loaded:
> 1234567890
> abcdefghijklm - loaded and validated as crypt: abcdefghijklm
> abcdefghijklmo

> I am not sure what to do. You see 2 return statements here. There are
> 3 more before my code, they do not need to be handled specially.
> 
> 	if (ldr_check_list(db_opts->users, *login, *uid)) return 0;
> 	if (ldr_check_list(db_opts->groups, gid, gid)) return 0;
> 	if (ldr_check_shells(db_opts->shells, shell)) return 0;
> 
> While the first 2 'return' statements may be extended to print the
> line to be skipped in --show=types mode before exit.

I wrapped the first 2 return statements so a caller may expect 1 line
of output per 1 line of input if it does not use selectors. Selectors
work for user's convenience. Though --salts= and --costs= are not
respected.

For skipped lines, the second field is empty. Login is written
into third field if it parsed. Ciphertext is written to 4th field.
Empty field are written to guarantee 7 fields on line.


I am in trouble with --field-separator-char=C : / may be requested as
field separator while default value for shell and some others fields
is "/".

		for (; i < 10; i++)
			fields[i] = "/";

So the contents of a field may contain the field separator char.

No patch attached.

Thanks!

-- 
Regards,
Aleksey Cherepanov

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.