So you say you want a Brute Force Dictionary?
Look no further than your very own DBMS. Utilizing some basic sets we can have the DBMS produce anything we ask. For this example I have created two tables as follows.
1CREATE TABLE [dbo].[alphabet](
2 [letter] [char](1) NOT NULL,
3 CONSTRAINT [PK_alphabet] PRIMARY KEY CLUSTERED
4(
5 [letter] ASC)
6)
2 [letter] [char](1) NOT NULL,
3 CONSTRAINT [PK_alphabet] PRIMARY KEY CLUSTERED
4(
5 [letter] ASC)
6)
This table shall hold our alphabet (in case that wasn't totally obvious) I will be using A-Z and 0-9 as my alphabet.
1CREATE TABLE [dbo].[dictionary](
2 [word] [varchar](50) NOT NULL,
3 CONSTRAINT [PK_dictionary] PRIMARY KEY CLUSTERED
4([word] ASC)
5)
2 [word] [varchar](50) NOT NULL,
3 CONSTRAINT [PK_dictionary] PRIMARY KEY CLUSTERED
4([word] ASC)
5)
and this table shall be our permanent storage of our generated dictionary.
That's all you need, right there, yep...that's it. OK OK I'll write the query for you too.
1SELECT
2 a.letter + b.letter + c.letter + d.letter + e.letter + f.letter + g.letter as word
3FROM
4 alphabet as a,
5 alphabet as b,
6 alphabet as c
2 a.letter + b.letter + c.letter + d.letter + e.letter + f.letter + g.letter as word
3FROM
4 alphabet as a,
5 alphabet as b,
6 alphabet as c
Execute that query and wait a few seconds and you will then have a complete list of every 3 alphanumeric character combination. Pretty neat eh?
TweetBacks
There are no comments for this entry.
[Add Comment] [Subscribe to Comments]