Created
November 26, 2021 08:54
-
-
Save gnh1201/3358bc9c7ed78119f525b4e44e550f80 to your computer and use it in GitHub Desktop.
Program.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| namespace SomethingWrong | |
| { | |
| class Program | |
| { | |
| static char[] key = new char[] { | |
| (char)0x46, (char)0x75, (char)0x63, (char)0x6B, (char)0x4D, (char)0x69, | |
| (char)0x63, (char)0x72, (char)0x6F, (char)0x73, (char)0x6F, (char)0x66, | |
| (char)0x74, (char)0x31, (char)0x32, (char)0x33 | |
| }; | |
| static List<char> output = new List<char>(); | |
| static void Main(string[] args) | |
| { | |
| int i = 0; | |
| using (StreamReader sr = new StreamReader("encrypt_data")) | |
| { | |
| while (sr.Peek() >= 0) | |
| { | |
| char c = (char)sr.Read(); | |
| output.Add((char)(key[i % 16] ^ c ^ (char)(i % 255))); | |
| i++; | |
| } | |
| } | |
| Console.WriteLine(new string(output.ToArray())); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment