For symmetric encryption, where the key length is shorter than the length of the encoder, you are guaranteed not to be able to create all possible text files. You can probably guess what form of your plain text will take, to some extent, you probably know whether it is an image or XML, or if you don’t even know that much, then you can assume that you can run file and do not get the "data". You should hope that there are only a few keys that will give you even vaguely reasonable decryption and only one that matches the shape you are looking for.
If you have a sample of plain text (or partial text), it becomes much easier.
Andrew Aylett
source share