Advertisement
FlyFar

abEncryption.pas

Dec 19th, 2023
1,394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.54 KB | Cybersecurity | 0 0
  1. unit abEncryption;
  2.  
  3. interface
  4.   uses Windows;
  5.  
  6. function Decrypt(const InStr: String): String;
  7.  
  8. implementation
  9.  
  10. function Decrypt(const InStr: String): String;
  11. var
  12.   C1, C2: Integer;
  13.   Ch1, Ch2: Byte;
  14.   OutStr, Key: String;
  15. begin
  16.   Key := '####';
  17.   C1 := 0;
  18.   C2 := 0;
  19.   OutStr := '';
  20.   while (C1 < Length(InStr)) do
  21.   begin
  22.     Inc(C1);
  23.     Inc(C2);
  24.     if (C2 > Length(Key)) then C2 := 1;
  25.     Ch1 := Ord(InStr[C1]);
  26.     Ch2 := Ord(Key[C2]) + 128;
  27.     OutStr := OutStr + Chr(Ch1 xor Ch2);
  28.   end;
  29.   Result := OutStr;
  30. end;
  31.  
  32. end.
Tags: botnet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement