Insomnia 24/7 character generator

Have a tool that you think is awesome enough to be promoted by Hackerthreads? Submit it in a thread here. This forum is write-only, like a drop-box, and you will not be able to see other threads.

Insomnia 24/7 character generator

Postby Cool_Fire » Mon Mar 28, 2011 6:49 am

Name of Tool: Gen
Author: Cool Fire
Language coded in: Perl
What it does: Generates all possible combinations of a set of characters for a specified length
Other notes: Probably not too useful on it's own, but handy to have around for custom brute force scripts and such.
Code: Select all
#!/usr/bin/perl # Will generate all combinations of the given characters for a given length sub gen; @chars = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); # This should hold all the characters you want in the mix. $length = 6; # Set the length you want here. my @word = ((0) x $length - 1); # Create null array of the length we need &gen(0); # Start generating at the first character. sub gen { foreach $char (@chars) { @word[$_[0]] = $char; if($_[0] < $length - 1) { &gen($_[0] + 1); } else { print @word; print "\n"; } } }
Source with syntax highlighting
If we're breaking the rules, then how come you can't catch us? You can't find us? I know why. Cause, it's ... MAGIC!
Hackerthreads chat, where the party is going 24/7.
User avatar
Cool_Fire
Not a sandwich
 
Posts: 1880
Joined: Fri May 09, 2003 1:20 pm
ICQ: 336613081
Website: https://www.insomnia247.nl/
Yahoo Messenger: cool_fire_666
AOL: EvilCoolFire
Location: 41 6d 73 74 65 72 64 61 6d

Return to ā€œ%sā€ Tool Submission

Who is online

Users browsing this forum: No registered users and 0 guests

cron