1: // stegafax -- A fax based steganographic tool.

  3: #include <stdio.h>

  5: #include "noise.H"
  6: #include "encode.H"
  7: #include "decode.H"


 10: int main(int nargs, char* args[]) {
 11:   char* MODE = args[1];

 13:   // Perform the requested function.

 15:   if (nargs > 1) {

 17:     if (strcmp(MODE, "noise") == 0) {
 18:       return noise(nargs, args);
 19:     }
 20:   
 21:     if (strcmp(MODE, "encode") == 0) {
 22:       return encode(nargs, args);
 23:     }

 25:     if (strcmp(MODE, "decode") == 0) {
 26:       return decode(nargs, args);
 27:     }

 29:   }

 31:   // Help the poor clueless user.

 33:   printf(
 34:          "Usage:\n"
 35:          "       stegafax noise <seed> <percent> <input_file> <output_file>\n"
 36:          "       stegafax encode <seed> <ciphertext_file> <fax_file> <stega_file>\n"
 37:          "       stegafax decode <seed> <stega_file> <ciphertext_file>\n"
 38:          "\n");

 40:   return -1;
 41: }