Computer Science Canada

random letters

Author:  beedub [ Sat May 31, 2003 10:20 pm ]
Post subject:  random letters

if i were to create something that just made random letters how would i do that. I can do it with ints just not letters.

Author:  Martin [ Sat May 31, 2003 10:27 pm ]
Post subject: 

Well, first of all each letter has its own character code, accessed by the ord command. Here's how you'd make random letters appear


code:
loop
  if Rand.Int(0,1) = 1 then
    put chr(Rand.Int(ord('a'), ord ('z')))
  else
    put chr(Rand.Int(ord('A'), ord('Z')))
  end if
end loop

Author:  beedub [ Sat May 31, 2003 10:34 pm ]
Post subject: 

then how would i incorporate ints or other chars into that?

Author:  beedub [ Sat May 31, 2003 11:23 pm ]
Post subject: 

also after it is done every possible pattern of lettering... i want it to stop... how do i do that?

Author:  Tony [ Sat May 31, 2003 11:48 pm ]
Post subject: 

you generate a random integer, take it as ASCII value and print character based on that
code:

put chr(integer)


what Darkness did here is he use ord to calculate ASCII values between a and z

I don't understand what you mean with letter patterns

Author:  Blade [ Sun Jun 01, 2003 12:21 am ]
Post subject: 

if you mean just get 26 letters... which would be every letter in the alphabet... just run a for loop for 26 instead of a conditional loop... but elaborate more on the question

Author:  beedub [ Sun Jun 01, 2003 8:57 am ]
Post subject: 

i meant that... when there is every possible pattern of letters and numbers done it just stops. heres an example lets say you want to find a combo for a lock. you start off with 1-1-1. then you go with maybe 1-2-1, then maybe 1-3-1 and so on until you get every possible one of those. But then you dont find the combo. then ur screwed and in this case the program stops.

Author:  Blade [ Sun Jun 01, 2003 12:08 pm ]
Post subject: 

well you still havent really answered the question... you want every possible combonation... with how many letters&numbers? you say a lock. well in this case theres only 3 numbers to a combonation... how many do you want for htis one?

Author:  Dan [ Sun Jun 01, 2003 1:31 pm ]
Post subject: 

i am the only one that sees somting going on here?

1st he asks if there is a way to link a progme to the net and then he ask about making a progame out put every comabo for a set of chars and nums.

he is trying to make a hacking progamer Twisted Evil , lol

not that i care if any one helps you make it or not i just thougth that it was funny that no one cahogt on to that yet. Laughing

Author:  beedub [ Sun Jun 01, 2003 2:45 pm ]
Post subject: 

yes i am... lol

Author:  beedub [ Sun Jun 01, 2003 3:17 pm ]
Post subject: 

i need it to go past 6 letters... i assume that no1 ever goes past like maybe 12 letters

Author:  beedub [ Sun Jun 01, 2003 3:19 pm ]
Post subject: 

it also just needs to be used symbols like numbers quotations and letters (doesnt mater whether it is caps)...

Author:  Andy [ Sun Jun 01, 2003 3:38 pm ]
Post subject: 

umm, you do realize that there are exactly 227,390,317,427,037,786,292,224 possible combinations of passwords for hotmail:7-15 characters
36^7+36^8+36^9+36^10+36^11+36^12+36^13+36^14+36^15

o and for your question, you could have a string with all the characters in it and just randomly select one out of there

code:

characters:="abcdefghijklmnopqrstuvwxyz10234567890"
put characters(Rand.Int(1,36))

Author:  PaddyLong [ Sun Jun 01, 2003 7:36 pm ]
Post subject: 

hehe I actually wrote a program that was to create a dictionary file of all the combinations of the characters in a set string and of set lengths... I tried running it once for I think like alphanumeric characters and combinations 1-5 characters long... lol o my did that file get large quick and the program take for ever to run Razz

Author:  Prince [ Mon Jun 02, 2003 10:04 am ]
Post subject: 

holy shit thats alotta combinations Shocked


: