home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / HATCH / LINKUP24.ZIP / DE.C next >
C/C++ Source or Header  |  1995-12-03  |  4KB  |  69 lines

  1. /**************************************************************************
  2. *   DE.C/DECRYPT.OBJ Copyright 1994 Chavous Camp, all rights reserved!    *
  3. *   DE.C -- Main decryption engine for the new encryption method being    *
  4. *           distributed to registered LinkUp SysOps.                      *
  5. ***************************************************************************
  6. * You may modify this code to be used in your network, BUT this code is   *
  7. * copyrighted and may NOT be distributed to ANYONE without prior          *
  8. * permission from the author, Chavous Camp.                               *
  9. ***************************************************************************
  10. * Before compiling, you need to copy DE.C to the following files:         *
  11. * DE1.C, DE10.C, DE257.C, DE258.C, DE259.C, DE260.C, DE261.C, and DE511.C *
  12. * then edit each file accordingly using any text editor, then you may     *
  13. * compile them(NOTE:  They must be compiled using the SMALL memory model) *
  14. * here's the command line to compile each DE file:                        *
  15. *    BCC -ms dexxx.c decrypt.obj                                          *
  16. * or TCC -ms dexxx.c decrypt.obj                                          *
  17. * change the xxx to be the number of the DE file your compiling....       *
  18. **************************************************************************/
  19. #include <conio.h>
  20. #include <stdio.h>
  21. #include <stdlib.h>
  22. #include <io.h>
  23. #include <string.h>
  24. /************************************************************************
  25. * Below is the password for the encryption method, it is used to make   *
  26. * encryption/decryption more unique so as to not allow anyone to "hack" *
  27. * into your network, the password can be up to 25 characters long, that *
  28. * should be enough characters to guarantee "uniqueness" for each method *
  29. * be sure to be as unique as possible when creating them, they WILL also*
  30. * be encrypted in each update you send out so that it makes it even     *
  31. * harder for someone to figure out the encryption method.  Be sure to   *
  32. * use the same password you used when configuring LinkUp, otherwise the *
  33. * updates will NOT go through correctly!  Be sure to change the password*
  34. * for EACH DE file.  There is a "meter" below to help you keep the      *
  35. * passwords under 25 characters                                         *
  36. * PW Meter [_________________________]**********************************/
  37. #define PW "PASSWORD"
  38. /************************************************************************
  39. * change the message to be whatever you want the DE file to say when an *
  40. * update is properly decrypted, leave it blank "" if you don't want a   *
  41. * message to be printed out                                             *
  42. ************************************************************************/
  43. #define Message "\rReceived NetName Update\n"
  44. /************************************************************************
  45. *    DO NOT modify this block of code!  If you do you will regret it!   *
  46. ************************************************************************/
  47. typedef struct {
  48.    char password[25];
  49.    char orig_name[13];
  50.    long orig_file_len;
  51.    int enc_method;
  52.    char res[80]; //reserved for later updates...
  53. } inforec;
  54. //***********************************************************************
  55.  
  56. extern int decrypt(char *filein, inforec inf, char *message);
  57.  
  58. int main(int argc, char **argv)
  59. {
  60.    inforec inf;
  61.  
  62.    strcpy(inf.password,PW);
  63.    if (argc==2)
  64.      exit(decrypt(argv[1], inf, Message));
  65.    else
  66.      exit(1);
  67.    return 1;
  68. }
  69.