Home | Community | Message Board


Edabea
Please support our sponsors.

General Interest >> Science and Technology

Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Jump to first unread post. Pages: 1
InvisibleOJK
Stranger
 User Gallery
Registered: 06/08/03
Posts: 10,629
generating words based on a template
    #3562349 - 12/30/04 07:36 PM (12 years, 2 months ago)

Hi there;

does anyone know any software that can generate a list of random terms to a prescribed pattern?

for example;

take the word: abc123

and realise that the first three characters are letters, and the next three digits, and then generate a list of words that would look like;

ljs938
lns932
nms394
nxl921
mas924

etc...

so that it would be possible to create, for example, a list of passwords to use all based on one template password.

If anyone knows anything that does anything similar to this, please post, your help is very greatly appreciated.

Thanks.


Post Extras: Print Post  Remind Me! Notify Moderator
Offlineummikko
sika joka eilenn? on pelkk?sika

Registered: 04/02/03
Posts: 1,222
Loc: Finland
Last seen: 6 years, 9 months
Re: generating words based on a template [Re: OJK]
    #3568107 - 01/01/05 02:12 PM (12 years, 2 months ago)

Do you need a program with other categories besides letters and digits? Upper/lowercase?


--------------------
"All substances are poisons; there is none which is not a poison. The right dose differentiates a poison and a remedy." -Paracelsius


Post Extras: Print Post  Remind Me! Notify Moderator
InvisibleOJK
Stranger
 User Gallery
Registered: 06/08/03
Posts: 10,629
Re: generating words based on a template [Re: ummikko]
    #3570353 - 01/02/05 09:49 AM (12 years, 2 months ago)

no, it's not case sensitive and standard alphanumberical will be fine.


Post Extras: Print Post  Remind Me! Notify Moderator
Offlineummikko
sika joka eilenn? on pelkk?sika

Registered: 04/02/03
Posts: 1,222
Loc: Finland
Last seen: 6 years, 9 months
Re: generating words based on a template [Re: OJK]
    #3580361 - 01/04/05 06:22 PM (12 years, 2 months ago)

Hi!

I had nothing better to do right now, so I wrote you a program that does what you wanted. Here you go, It?s written in java. Save in a file Generator.java and compile:
----clip-------
import java.util.*;

public class Generator{

public static Random RollDice= new Random();

public static char getLetter(){
return (char)(RollDice.nextInt(25)+65);
}

public static void main(String[]args){
try{
String Model=new String(args[0]);
String Number=new String(args[1]);
int times=Integer.valueOf(Number).intValue();
char[] Parts=Model.toCharArray();
Character Examiner=new Character(' ');
for (int j=0;j<times;j++){
for (int a=0;a<Model.length();a++){
if (Examiner.isJavaLetter(Parts[a])) System.out.print(getLetter());
if (Examiner.isDigit(Parts[a])) System.out.print(RollDice.nextInt(10));
}
System.out.println();
}
}catch (ArrayIndexOutOfBoundsException e){System.out.println("Syntax: java Generator [template] [number]");}
}
}
--------clip---------

To use type "java Generator xxxxxxxxxxxxxxxx y", where xxxxxxxx is the template that you want to use and y is the number of generated words you want
Hope it suits your needs :laugh:


--------------------
"All substances are poisons; there is none which is not a poison. The right dose differentiates a poison and a remedy." -Paracelsius


Post Extras: Print Post  Remind Me! Notify Moderator
Jump to top. Pages: 1

General Interest >> Science and Technology

Similar ThreadsPosterViewsRepliesLast post
* Can Someone Give me a Flash Site Template Earth_Droid 601 3 01/25/03 06:08 PM
by rommstein2001
* base pi Jangempo 638 1 03/16/04 02:16 PM
by phi1618
* First Intel Based Apple Computer *DELETED*
( 1 2 all )
Scott Bennett 1,655 21 03/19/06 02:12 AM
by Vulture
* Alleged photos of Space Based ‘Research’ Platforms.
( 1 2 3 4 5 all )
sparkoflife 4,774 92 03/27/09 05:24 AM
by zouden
* possible to strip debian back to base system? sherm 1,128 7 07/10/05 12:48 PM
by Huehuecoyotl
* Commerial Quantum Transistors Based On Electron Spin Will Be Available By 2015 DiploidM 963 3 01/02/06 10:03 PM
by RuNE
* NASA to build a moon base Syle 1,166 11 12/08/06 02:31 PM
by DeMush411
* Atmel chipset and microcontroller based projects SeussA 1,050 5 01/03/08 05:32 AM
by Seuss

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: Lana, trendal, Diploid, automan
429 topic views. 0 members, 4 guests and 1 web crawlers are browsing this forum.
[ Toggle Favorite | Print Topic | Stats ]
Search this thread:
Sporeworks
Please support our sponsors.

Copyright 1997-2017 Mind Media. Some rights reserved.

Generated in 0.037 seconds spending 0.005 seconds on 14 queries.