Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (13) </ [1] 2 3 4 5 6 ... >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: C question, loops< Next Oldest | Next Newest >
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Jan. 12 2008,13:35 QUOTE

I want to have a program output all possible words up to 30 letters, like:
a
b
..
aa
ab
..
aaa
aab
aac

I tried some methods, but the only one that worked was creating a loop for every depth. There must be a simpler way to do this. Any ideas?

Edit: I wish to test my RSA password strength, how long it would take to break it.


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Jan. 12 2008,15:03 QUOTE

Check out regular expressions. I don't know how they work in C, but there is probably more than one way to set it up.

There are also security tools available to test things like password strength.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Jan. 12 2008,15:12 QUOTE

Too bad John doesn't support RSA ;)

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Jan. 12 2008,18:10 QUOTE

Thanks. All that was needed was Bash afterall. With the regex syntax {a..z} :D

--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
curaga Offline





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Jan. 12 2008,18:23 QUOTE

Hm. Appears that after 10 letter words or so bash runs out of memory. And consumes all ram and 100+mb swap. So it isn't practical for long words, which I need :(

Back to drawing board..


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
64 replies since Jan. 12 2008,13:35 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (13) </ [1] 2 3 4 5 6 ... >/
reply to topic new topic new poll
Quick Reply: C question

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code