Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 15 Apr 2013 04:05:38 +0200
From: Lukas Odzioba <lukas.odzioba@...il.com>
To: magnum <john.magnum@...hmail.com>
Cc: john-dev@...ts.openwall.com
Subject: Re: All *2john programs should use basename of filename
 when put as ?login? field

2013/4/12 magnum <john.magnum@...hmail.com>:
> You never posted the basename patch, did you? BTW we're also waiting for GPU version of pbkdf2-hmac-sha512 ;-)

Basename patch attached:

I added char *strip_suffixes(const char *src, const char *suffixes[],
int count) to misc.c/h.
It is able to strip multiple suffixes from source, for example:

const char *srcs[]={"file.pgp.txt","file.txt.pgp",file.txt","file.pgp"};
const char *ext[] = { ".pgp", ".txt"};

strip_suffixes(srcs[0],ext,2) = file
strip_suffixes(srcs[1],ext,2) = file
strip_suffixes(srcs[2],ext,2) = file
strip_suffixes(srcs[3],ext,2) = file
strip_suffixes(srcs[0],ext,1) = file.pgp

Suffixes order does not matter, If this is confusing we can trivially
change that, but I guess this way is better.

basename + extensions stripping:
mozilla2john: .db
keepass2john: .kdbx
pwsafe2john: .psafe3
putty2john: .ppk
pfx2john: .pfx .p12

just basename:
keychain2john
keyring2john
ssh2john

TODO:
kwallet2john - prints just hex
truecrypt_volume2john - prints fixed string instead of user name
gpg2john.cpp - I left it as is, I guess I'll be the lucky one who will
port it to c.

pbkdf2-hmac-sha512 I need to try to do that in small steps otherwise
I'll never start :)

Lukas

Download attachment "basename_extensions.diff" of type "application/octet-stream" (11063 bytes)

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.