Well, you should consider that almost all passwords are longer then 4 characters and shorter then 10. This means you have 6 spots. Each spot will most likely contain a alfanumeric character, ie, a-zA-Z0-9. Thats 26 * 2 + 10 = 62.
62 ^ 6 = 5.6E10, or about 56 billion entries. If you use a varchar(20) field for the hash this means 1Tb of data, including overhead etc you can make it an even 1.5Tb. Thats a lot'a data, but not impossible for current fileservers. It won't be fast, and it will be even bigger if you use an index to improof speed, but I daresay its possible to create a working sollution.
Ofcourse, another option is to design a webcrawler and simply index every word on the web, there are only like 20.000 words in the english language if I recall correctly, so it'll be a piece of cake to index that.