LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-24-2014, 08:24 AM   #1
rehan_gree
LQ Newbie
 
Registered: May 2014
Posts: 2

Rep: Reputation: Disabled
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
 
Old 05-24-2014, 08:28 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Sounds like homework.

What have you tried?
 
Old 05-24-2014, 08:47 AM   #3
rehan_gree
LQ Newbie
 
Registered: May 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-24-2014, 12:34 PM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
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
 
Old 05-27-2014, 03:52 PM   #5
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by rehan_gree View Post
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...

Last edited by joe_2000; 05-27-2014 at 04:01 PM. Reason: counter reset
 
Old 05-28-2014, 03:57 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,348

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Definitely show us your code; then we can help.
(Use code tags https://www.linuxquestions.org/quest...do=bbcode#code)
 
Old 08-03-2014, 09:29 PM   #7
kentukynitemare
LQ Newbie
 
Registered: Aug 2014
Posts: 3

Rep: Reputation: Disabled
You're looking for the -d command. Check MAN CRUNCH

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

Last edited by kentukynitemare; 08-03-2014 at 09:31 PM.
 
Old 08-04-2014, 12:05 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Quote:
Originally Posted by kentukynitemare View Post
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
 
Old 08-04-2014, 12:22 AM   #9
kentukynitemare
LQ Newbie
 
Registered: Aug 2014
Posts: 3

Rep: Reputation: Disabled
Just making sure the answer is here for the next person who needs it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to recognize which word from a list? Xeratul Linux - Software 3 06-11-2013 12:52 PM
Bash - Random word generator dtmc Programming 3 03-14-2012 02:49 PM
[SOLVED] creating a list of word using tr command arvindk.monu Programming 5 07-13-2010 12:02 AM
Word list generation (all combinations) from a list of characters llattan Linux - Newbie 1 04-07-2009 07:41 PM
bash script - progressive world list generator musther Programming 2 01-10-2008 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration