OK so I started a thread recently where I said I was gonna alter Aircrack so that it can read a dictionary from stdin.

What I would have done is found the piece of code that calls the "fopen" function. When you supply a program like Aircrack with a dictionary filename, it will open the file something like:

FILE *dictfile = fopen(path_to_dictionary,"r");
What I would have done is designated a "special file name" that makes the program read from STDIN. Basically, if you specified the file name as something like "I_LIKE_TO_WATCH", then it would read from stdin. The code would look something like:

FILE *dictfile;

if ( !strcmp(path_to_dictionary, "I_LIKE_TO_WATCH") )
    dictfile = stdin;
    dictfile = fopen(path_to_dictionary,"r");
That would have worked fine. But then something occurred to me. . .

Instead of altering the code for Aircrack, I could actually go into the C Standard Library source files and alter the code for the "fopen" function.

I could alter the "fopen" function making it return stdin if the filename is something like "I_LIKE_TO_WATCH". Also, if a file is being opened for writing, I can make it return stdout if the filename is "I_LIKE_TO_WATCH".

If these changes are made to the actual C library, then there will be no need to alter the source code of programs like Aircrack. You could literally just download the source code for any C program, compile it, and have it work straight away.

For instance you could just re-compile Aircrack and then run it as follows:

crunch 8 8 | aircrack-ng -w I_LIKE_TO_WATCH *.cap
I haven't had breakfast yet so I think I'll get started on this later in the day. Should be fun.