Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5558C10D.7020509@gmail.com>
Date: Sun, 17 May 2015 18:25:49 +0200
From: Marek Wrzosek <marek.wrzosek@...il.com>
To: john-users@...ts.openwall.com
Subject: Re: Advise on best approach (truecrypt pw based on pdf
 file)

W dniu 17.05.2015 o 17:11, magnum pisze:
> On 2015-05-17 12:18, Demian Smith wrote:
>> So, this is my last question and with it I wish to apply for the "Most
>> stupid question - 2015" award - is it possible, to create a "moving
>> interval" rule?
> 
> Not in the way you describe below, no. Mainly because I believe we can't
> handle more than 125 characters of input in one line.
> 
>> I am thinking to take my wordlist rule, remove all the line breaks so
>> that I have a really long stream of chars and then just move the
>> Interval.
>>
>> Say, my stream would be
>> SiadqrfewmnsohabiwtoarotwwsbaotmcaaTpthbwuitrubwltetpt
>>
>> I'd like to have rule (or preoprocessed rule) that walks throught the
>> file like this
>> [Siad]qrfewmnsohabiwtoarotwwsbaotmcaaTpthbwuitrubwltetpt
>> [Siadq]rfewmnsohabiwtoarotwwsbaotmcaaTpthbwuitrubwltetpt
>> [Siadqr]fewmnsohabiwtoarotwwsbaotmcaaTpthbwuitrubwltetpt
>> (...)
>> [Siadqrfewmnsohabiwto]arotwwsbaotmcaaTpthbwuitrubwltetpt
>> S[iadq]rfewmnsohabiwtoarotwwsbaotmcaaTpthbwuitrubwltetpt
>> S[iadqr]fewmnsohabiwtoarotwwsbaotmcaaTpthbwuitrubwltetpt
>> S[iadqrf]ewmnsohabiwtoarotwwsbaotmcaaTpthbwuitrubwltetpt
>> (...)
>> Si[adqr]fewmnsohabiwtoarotwwsbaotmcaaTpthbwuitrubwltetpt
> 
> I think this is best done with a perl script or something. Probably very
> trivial but I'll pass for now. Anyone?
> 
> magnum
> 
Hi

This simple awk one-liner can do the trick:
awk '{for (i = 1; i <= length($1); i++){for
(j=i;j<=length($1);j++){print substr($1, i, j-i+1);}}}'

Feel free to adjust i or j accordingly (e.g. if you don't want passwords
shorter than 4 letters just change j=i to j=i+3).

Best Regards
-- 
Marek Wrzosek
marek.wrzosek@...il.com

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.