Advertisement
Guest User

Untitled

a guest
Jan 15th, 2014
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1.         private static void Main(string[] args)
  2.         {
  3.  
  4.  
  5.             string str = "Super Secret Key";
  6.             string text = Program.read();
  7.  
  8.             foreach (char x in str)
  9.                 Console.Write(Program.search(x, text));
  10.  
  11.  
  12.             Console.ReadLine();
  13.         }
  14.  
  15.         private static string read()
  16.         {
  17.             StreamReader streamReader = new StreamReader(@"C:\Users\Daniel\Desktop\reverse100.exe");
  18.  
  19.                 return streamReader.ReadToEnd();
  20.         }
  21.  
  22.         private static string search(char x, string text)
  23.         {
  24.             int length = text.Length;
  25.             for (int index = 0; index < length; ++index)
  26.             {
  27.                 if ((int)x == (int)text[index])
  28.                     return Convert.ToString(index * 1337 % 256, 16).PadLeft(2, '0');
  29.             }
  30.             return "??";
  31.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement