If this is your first visit, be sure to
check out the Forum Rules by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

taking duplicate entries out on the fly...??

Hi

Firstly I hope this is the correct place for this post as I have been having a really hard time searching these excellent forums and the internet as a whole and discovered nothing of any use so thought you guys would be the perfect place to post as this seems to be where I make all my discoveries and breakthroughs... Anyway I digress...

So to get to my point I was wondering if it is possible to create a wordlist with crunch (which is easy enough) and perhaps piping it through to another program that will take entries out that have multiple letters and numbers on the fly ie..
aa
bb
cc
dd

11
22
33
44

also does anybody know of either a process to make crunch create a list with alternating alphanumeric a1b2c3d4....???

or if not perhaps redirect these results on the fly as crunch makes the wordist?
I beliveve this would keep the size of aforementioned list day a little at least as I think the calculation would go something like this 26x10x26x10x26x10x26x10 ...??? also i would like to create the reverse 10x26x10x26x10x26x10x26..

Re: taking duplicate entries out on the fly...??

You could write a small little C program that discards strings that contain duplicate characters.

The guts of it would be something like:

Code:

void Print_String_If_All_Characters_Are_Unique(char const *const str)
{
for (char const *p = str ; *p != '\0'; ++p) /* Until we reach the null terminator */
{
/* Exit loop if next character is null terminator */
if (p[1] == '\0')
break;
if ( strchr(p+1,*p) )
{
/* If this block of code is entered, it means a duplicate
character was found. So we exit the function without
printing the string */
return;
}
}
/* This point can only be reached if there were no duplicate characters */
puts(str);
}

Also there is no real need to enter values for special charactes in this case.

A better way would be to use;

Code:

./crunch 8 8 -f charset.lst lalpha-numeric -t @%@%@%@%

Cheers pal you are totally right currently running it now started at 1pm yesterday and at current guestimates its gonna take 80 days!

Originally Posted by Virchanza

You could write a small little C program that discards strings that contain duplicate characters.

The guts of it would be something like:

Code:

void Print_String_If_All_Characters_Are_Unique(char const *const str)
{
for (char const *p = str ; *p != '\0'; ++p) /* Until we reach the null terminator */
{
/* Exit loop if next character is null terminator */
if (p[1] == '\0')
break;
if ( strchr(p+1,*p) )
{
/* If this block of code is entered, it means a duplicate
character was found. So we exit the function without
printing the string */
return;
}
}
/* This point can only be reached if there were no duplicate characters */
puts(str);
}

...or something along those lines.

thanks for the reply would there by any way to do this but also account for the instances of eg a1a1a1s7 or z5z5z5k9 and to take these out??