home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / DOS / Comunic / BBSREG11.ZIP / GECHO!.ZIP / GECHO!.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-11-24  |  4.3 KB  |  137 lines

  1. {
  2.  ============================================================================
  3.                          GECHO Serial Key Generator
  4.                    Copyright (c) 1995 Hackers Technology
  5.                             All Rights reserved.
  6.  
  7.   You are free to use and modified this program without any modifications
  8.   into OBJ (object) code.  The author has no responsibilities about misused
  9.   of this program, use it with your own risk.
  10.  ============================================================================
  11. }
  12. Program GECHO_KEYMAKER;
  13. Uses CRT;
  14.  
  15. {
  16.  ----------------------------------------------------------------------------
  17.   This program using GECODE.OBJ to create GECHO Serial Key. The OBJ file has
  18.   three routines, are:
  19.  
  20.     * GE_ECHO Function
  21.       Syntax : GE_ECHO(UserName : String; Var KeyCodeArray) : LongInt;
  22.       Purpose: Create GEcho Serial Number and Serial Key.
  23.       Param  : - UserName for GEcho Registering name.
  24.                - KeyCodeArray for Serial Key, and should be pointed to an
  25.                  array that at least 4 bytes long.
  26.       Return : Serial Number in unsigned long integer type.
  27.  
  28.     * GE_UTIL Function
  29.       Syntax : GE_UTIL(UserName : String) : LongInt;
  30.       Purpose: Create GEUtil Serial Number.
  31.       Param  : UserName for GEUtil Registering name.
  32.       Return : Serial Number in unsigned long type.
  33.  
  34.     * LONG2STR Procedure
  35.       Syntax : LONG2STR(Num : LongInt; VAR NumStr : STRING);
  36.       Purpose: Convert an unsigned long to a Turbo Pascal string type.
  37.                Solve the Pascal limitation which does not capability
  38.                to generate an unsigned long integer type.
  39.       Param  : - Num to specified an unsigned long to be converted.
  40.                - Unsigned long converting result returned on NumStr.
  41.       Return : None
  42.  ----------------------------------------------------------------------------
  43. }
  44.  
  45.  
  46. { !!!!!!! ALWAYS INTERFACING TO OBJECT ROUTINES WITH FAR CALL TYPE !!!!!!!! }
  47.  
  48. {$L GECODE.OBJ}
  49. {$F+}
  50. Function  GE_ECHO(UserName : STRING; Var KeyCode) : LongInt; External;
  51. Function  GE_UTIL(UserName : STRING) : LongInt; External;
  52. Procedure LONG2STR(Num : LongInt; Var NumStr : String); External;
  53. {$F-}
  54.  
  55. CONST
  56.   PName         : String[20] = 'GEcho Keymaker Lite ';
  57.   PVersion      : String[12] = 'Version 1.0ß';
  58.   POwner        : String[38] = 'Copyright (¢) 1995 Hackers Technology.';
  59.   PLegal        : String[22] = '  All rights reserved.';
  60.  
  61.   IDHeader1     : String[14] = 'Registered to ';
  62.   IDHeader2     : String[14] = '├─GEcho Key   ';
  63.   IDHeader3     : String[14] = '└─MBUTIL Key  ';
  64.  
  65.   CreateTxt     : String[26] = 'Create Serial txt file... ';
  66.   CreateBin     : String[26] = 'Create Serial Key file... ';
  67.   ResDone       : String[05] = 'Done.';
  68.   ResFail       : String[05] = 'Fail!';
  69.  
  70.   KeyFile       : String[10] = 'KEYFILE.GE';
  71.   KeyText       : String[09] = 'GECHO.KEY';
  72.  
  73.  
  74. VAR
  75.   TxtFile       : Text;
  76.   BinFile       : File;
  77.   uName         : String;
  78.   GESerial      : String;
  79.   MBSerial      : String;
  80.   LineStr       : String;
  81.   KeyBuffer     : Array[1..10] Of Byte;
  82.   Result        : LongInt;
  83.   Temp          : Word;
  84.  
  85.  
  86. BEGIN
  87.   ClrScr;
  88.   FillChar(LineStr, SizeOf(LineStr), 196);  LineStr[0] := #78;
  89.   WriteLn(PName, PVersion);
  90.   WriteLn(POwner, PLegal);
  91.   WriteLn(LineStr);
  92.  
  93.   Write('Enter your name (max. 50 chars) : '); ReadLn(uName);
  94.   WriteLn;
  95.  
  96.   Result := GE_Echo(uName, KeyBuffer);
  97.   Long2Str(Result, GESerial);
  98.  
  99.   Result := GE_Util(uName);
  100.   Long2Str(Result, MBSerial);
  101.  
  102.   WriteLn(IDHeader1, uName);
  103.   WriteLn(IDHeader2, GESerial);
  104.   WriteLn(IDHeader3, MBSerial);
  105.   WriteLn(LineStr);
  106.  
  107.   {$I-}
  108.   Write(CreateTxt);
  109.   Assign(TxtFile, KeyText);
  110.   ReWrite(TxtFile);
  111.   IF IOResult = 0 THEN
  112.   BEGIN
  113.     WriteLn(TxtFile, PName+PVersion);
  114.     WriteLn(TxtFile, POwner+PLegal);
  115.     WriteLn(TxtFile, LineStr);
  116.     WriteLn(TxtFile, IDHeader1+uName);
  117.     WriteLn(TxtFile, IDHeader2+GESerial);
  118.     WriteLn(TxtFile, IDHeader3+MBSerial);
  119.     WriteLn(TxtFile, LineStr);
  120.     Close(TxtFile);
  121.     WriteLn(ResDone);
  122.   END
  123.   ELSE WriteLn(ResFail+#7);
  124.  
  125.   Write(CreateBin);
  126.   Assign(BinFile, KeyFile);
  127.   ReWrite(BinFile, 1);
  128.   IF IOResult = 0 THEN
  129.   BEGIN
  130.     BlockWrite(BinFile, KeyBuffer, 4, Temp);
  131.     Close(BinFile);
  132.     WriteLn(ResDone);
  133.   END
  134.   ELSE WriteLn(ResFail+#7);
  135.   WriteLn;
  136. END.
  137.