LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-09-2014, 11:04 AM   #1
tirmazi3
LQ Newbie
 
Registered: May 2014
Posts: 1

Rep: Reputation: Disabled
8 digit wordlist alphanumeric


Hi,
I want to genrate a 8 digit alphanumeric wordlist consisting of charset (0123456789abcdefghijklmnopqrstuvwxyz)with some exceptions i.e, every key consist of any 5 numbers and alphabets not more then 3 in a key.
For example 2556b92d , 15688we4 , 34854a27 , 13420aw4 , etc.

i hope so you understand what i'm looking for please help me to create such a list or if any one has it please share with me

Thanks in advance !
 
Old 05-09-2014, 12:40 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,252

Rep: Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685Reputation: 2685
Try searching the forums for things like password generators as this topic has come up multiple times.

Also, if you wish for any help in actually writing or changing any code you would have to first present some as no one will do the work for you.
 
1 members found this post helpful.
Old 05-09-2014, 01:32 PM   #3
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 304

Rep: Reputation: 121Reputation: 121
In which programming language, or do you need only a description of the method?
 
Old 05-10-2014, 08:38 PM   #4
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 470

Rep: Reputation: Disabled
This should be a good start. Its quick and dirty, you can add bells and whistles if you like but it functions and matches the criterion you mentioned for now

compile with:

g++ -o <name for executible> <name of file>

Code:
#include<iostream>
#include<ctime>
#include<cstdlib>
using namespace std;
/* Change these values */
int char_per_word = 8;
int words_to_gen = 5;
/* Leave the rest alone */

int numbers_in_word = 0;
int chartype;
int value;
char chargen(){
	chartype = rand() % 3;
	    if ( chartype == 0 ){
			value = rand() % 10 + 48;
			numbers_in_word++;
		} 
	    else if ( chartype == 1 ) value = rand() % 26 + 65;
	    else value = rand() % 26 + 97;
	    return value;	
}
void wordgen(int char_per_word){
	char word[ char_per_word ];
	do{
		numbers_in_word = 0;
	    for( int i = 0; i < char_per_word; i++ ) word[i] = chargen();
	} while( numbers_in_word != 5 );
	
	for( int i = 0; i < char_per_word; i++ ) cout << word[i];
		
		cout <<endl;
    }
int main(){
    srand( time( NULL ) );
    for( int i = 0; i < words_to_gen; i++ ) wordgen( char_per_word);    
    cout << endl;
}
 
  


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
Generate SPECIAL alphanumeric WORDLIST - no characters appearing more than X times Stanley_212 Programming 4 01-20-2013 08:46 PM
Generate SPECIAL alphanumeric wordlist!!! Output! sapto Programming 6 02-14-2012 09:08 AM
Special alphanumeric wordlist! sapto Programming 4 02-13-2012 06:20 PM
Generate SPECIAL alphanumeric WORDLIST with a total amount of consonants, number, ut0ugh1 Programming 2 10-26-2011 03:59 PM


All times are GMT -5. The time now is 10:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration