anonymize.c 587 B

123456789101112131415161718192021222324252627
  1. #include <stdio.h>
  2. #include "zip.h"
  3. int deanonymize;
  4. int main(int argc, char **argv) {
  5. if (argc < 2) {
  6. printf("Usage: %s <path_to_DOCX>\n", argv[0]);
  7. printf("Optionaly provide output file as second argument.\n");
  8. printf("-d as second argument will deanonymize given file. You can optionaly provide output file as third argument.\n");
  9. return 0;
  10. }
  11. char *infile = argv[1];
  12. char *outfile = NULL;
  13. if (argc > 2) {
  14. if (strcmp(argv[2], "-d") == 0) {
  15. deanonymize = 1;
  16. if (argc > 3) outfile = argv[3];
  17. } else {
  18. outfile = argv[2];
  19. }
  20. }
  21. process(infile, outfile);
  22. }