LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   word list generator (https://www.linuxquestions.org/questions/linux-newbie-8/word-list-generator-4175505968/)

rehan_gree 05-24-2014 08:24 AM

word list generator
 
Hello Every one,
I am new in Linux. I am looking for a word list generator that generate word like this..

let say i want to generate 10 char long word but if one single char repeat 3 time then that should not store in the word list.

Example:
we want to generate 10 digit long word-list using crunch.

crunch will generate first line:
0000000000
"
"
9999999999 (last line in wodrlist)

now what we want here:
0001234567 take a look 0 is repeat 3 times. it should not store in word-list file.

or > 1234567772 take a look 7 is repeat 3 times. it should not store in word-list file.

Or > 9045833321 take a look 3 is repeat 3 times. it should not store in word-list file.

now if we want to generate a to z combination then
qxxxhygtbr, x is repeat 3 times . it should not store in word-list file.

Any help.

Thanks for your time

jpollard 05-24-2014 08:28 AM

Sounds like homework.

What have you tried?

rehan_gree 05-24-2014 08:47 AM

Thanks for replay

Don't take it that way maybe my Q sound like Home work for my bad English sorry about that.
I tried in C rand() function but can't got the output.

jdkaye 05-24-2014 12:34 PM

Why not just show us the code you have written and the errors that have occurred. That way it will be easier to tell you what your problem is.
jdk

joe_2000 05-27-2014 03:52 PM

Quote:

Originally Posted by rehan_gree (Post 5176317)
Hello Every one,
I am new in Linux. I am looking for a word list generator that generate word like this..

let say i want to generate 10 char long word but if one single char repeat 3 time then that should not store in the word list.

Example:
we want to generate 10 digit long word-list using crunch.

crunch will generate first line:
0000000000
"
"
9999999999 (last line in wodrlist)

now what we want here:
0001234567 take a look 0 is repeat 3 times. it should not store in word-list file.

or > 1234567772 take a look 7 is repeat 3 times. it should not store in word-list file.

Or > 9045833321 take a look 3 is repeat 3 times. it should not store in word-list file.

now if we want to generate a to z combination then
qxxxhygtbr, x is repeat 3 times . it should not store in word-list file.

Any help.

Thanks for your time

Here is a possible algorithm to get you started...
loop through all generated strings.
for each string, loop through all characters.
increment a counter (starting at 0 for each string) if a character equals the previous character and reset the counter to 0 otherwise
discard the string if the counter reaches or exceeds 2.

I am assuming there would also be some smart expression matching approaches that could handle this more elegantly...

chrism01 05-28-2014 03:57 AM

Definitely show us your code; then we can help.
(Use code tags https://www.linuxquestions.org/quest...do=bbcode#code)

kentukynitemare 08-03-2014 09:29 PM

You're looking for the -d command. Check MAN CRUNCH

ex: crunch 10 10 0123456789 -d 2 -o test.lst

jdkaye 08-04-2014 12:05 AM

Quote:

Originally Posted by kentukynitemare (Post 5214414)
You're looking for the -d command. Check MAN CRUNCH

ex: crunch 10 10 0123456789 -d 2 -o test.lst

I doubt if you'll get an answer. The OP hasn't been around since late May.
jdk

kentukynitemare 08-04-2014 12:22 AM

Just making sure the answer is here for the next person who needs it.


All times are GMT -5. The time now is 03:13 AM.