Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
using System.Security.Cryptography.X509Certificates;
using System.Text;
namespace xor_decrypt_url
{
class Program
{
public void decrypt(byte[] dizi, byte[] anahtar)
{
int i;
for(i = 0; i < dizi.Length; i++)
{
dizi[i] = (byte)(dizi[i] ^ anahtar[i]);
}
string urlPlain = Encoding.UTF8.GetString(dizi); //Byte'dan stringe çeviriyoruz.
Console.Write("URL: " + urlPlain);
}
static void Main(string[] args)
{
string KEYVALUE = "6^)(9-p35a%3#4S!4S0)$Yt%^&5(j.g^&o(*0)$Yv!#O@6GpG@=+3j.&6^)(0-=1";
byte[] anahtar = Encoding.UTF8.GetBytes(KEYVALUE); //Stringi byte olarak alıyoruz.
byte[] bArr = new byte[45];
bArr[0] = 94;
bArr[1] = 42;
bArr[2] = 93;
bArr[3] = 88;
bArr[4] = 3;
bArr[5] = 2;
bArr[6] = 95;
bArr[7] = 2;
bArr[8] = 13;
bArr[9] = 85;
bArr[10] = 11;
bArr[11] = 2;
bArr[12] = 19;
bArr[13] = 1;
bArr[14] = 125;
bArr[15] = 19;
bArr[17] = 102;
bArr[18] = 30;
bArr[19] = 24;
bArr[20] = 19;
bArr[21] = 99;
bArr[22] = 76;
bArr[23] = 21;
bArr[24] = 102;
bArr[25] = 22;
bArr[26] = 26;
bArr[27] = 111;
bArr[28] = 39;
bArr[29] = 125;
bArr[30] = 2;
bArr[31] = 44;
bArr[32] = 80;
bArr[33] = 10;
bArr[34] = 90;
bArr[35] = 5;
bArr[36] = 119;
bArr[37] = 100;
bArr[38] = 119;
bArr[39] = 60;
bArr[40] = 4;
bArr[41] = 87;
bArr[42] = 79;
bArr[43] = 42;
bArr[44] = 52;
Program ornek = new Program();
ornek.decrypt(bArr, anahtar);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.