home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Programming / pespin132.exe / pespin132 / Examples / delphi / Unit1.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2004-12-28  |  2.2 KB  |  105 lines

  1. {
  2. *******************************************************************************
  3.   Example in delphi by reywen^htb
  4. *******************************************************************************
  5. }
  6. unit Unit1;
  7.  
  8. interface
  9.  
  10. uses
  11.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  12.   Dialogs, StdCtrls, ExtCtrls;
  13.  
  14. type
  15.   TForm1 = class(TForm)
  16.     Button1: TButton;
  17.     Edit1: TEdit;
  18.     Label1: TLabel;
  19.     Image1: TImage;
  20.     procedure Button1Click(Sender: TObject);
  21.     procedure Image1Click(Sender: TObject);
  22.     procedure FormCreate(Sender: TObject);
  23.   private
  24.   public
  25.   end;
  26.  
  27. var
  28.   Form1: TForm1;
  29.  
  30. implementation
  31.  
  32. {$R *.dfm}
  33.  
  34. procedure TForm1.Button1Click(Sender: TObject);   //example crypt
  35. label bad_boy, good_code, bad_code;
  36. var
  37. example, i: integer;
  38. begin
  39.   if length(edit1.text) = 0 then goto bad_boy;
  40.  
  41.   {$I crypt_start.inc};             //********** crypt start
  42.  
  43.   i := 0;
  44.   example := 0;
  45.  
  46.   repeat
  47.     inc(i);
  48.     example := example + ord(edit1.text[i]);
  49.   until i>= length(edit1.text);
  50.  
  51.   example := example - 67;
  52.   example := example + 16;
  53.   example := example XOR 666;
  54.  
  55.   
  56.   example := example XOR 777;
  57.   example := example shl 2;
  58.  
  59.   i:=0;
  60.  
  61.   repeat
  62.     inc(i);
  63.     example := example*(i XOR (i*2));
  64.   until i>=6;
  65.  
  66.   {$I crypt_end.inc};                 //************ crypt end
  67.  
  68.   if example = 71928000 then
  69.   goto good_code;
  70.  
  71.   if example <> 71928000 then
  72.   goto bad_code;
  73.  
  74.   good_code:
  75.   messageboxa(0, 'Good pass :D', 'Example Markers', MB_OK);
  76.   goto bad_boy;
  77.  
  78.   bad_code:
  79.   messageboxa(0, 'Bad password. Try: PESpin', 'Example Markers', MB_OK);
  80.  
  81.   bad_boy:
  82. end;
  83.  
  84. procedure TForm1.Image1Click(Sender: TObject);
  85. begin
  86.   {$I crypt_start.inc};                     //****** crypt start
  87.  
  88.   MessageBoxA(Handle, 'Example in Delphi by reywen^htb', 'Example Markers...', MB_OK);
  89.  
  90.   {$I crypt_end.inc};                       //****** crypt end
  91. end;
  92.  
  93. procedure TForm1.FormCreate(Sender: TObject);
  94. begin
  95. {$I clear_start.inc};                       //****** clear start
  96.  
  97. Caption := 'PESpin Markers Test';
  98.  
  99. {$I clear_end.inc};                         //****** clear end
  100. end;
  101.  
  102. end.
  103.  
  104. //*** examples by reywen^htb ***
  105.