Fetch the repository succeeded.
using System;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
namespace TxJsq
{
class Crack
{
internal static void UnPack(string pan)
{
String pack = @"pack.zip";
File.WriteAllBytes(pack, Properties.Resources.TxJsq);
ZipFile.ExtractToDirectory(pack, pan + @":\");
File.Delete(pack);
}
internal static string DisUpdate(string pan)
{
Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardInput.AutoFlush = true;
p.StandardInput.WriteLine("netsh advfirewall firewall del rule dir=in name=腾讯网游加速器-升级程序");
p.StandardInput.WriteLine("netsh advfirewall firewall del rule dir=in name=disable_TxJsq_update");
p.StandardInput.WriteLine("netsh advfirewall firewall add rule dir=in name=disable_TxJsq_update action=block program=" + pan + @":\TxJsq\update\QMProxyAccUpdate.exe");
p.StandardInput.WriteLine("netsh advfirewall firewall del rule dir=out name=disable_TxJsq_update");
p.StandardInput.WriteLine("netsh advfirewall firewall add rule dir=out name=disable_TxJsq_update action=block program=" + pan + @":\TxJsq\update\QMProxyAccUpdate.exe");
p.StandardInput.WriteLine("exit");
string result = p.StandardOutput.ReadToEnd().ToString();
p.WaitForExit();
p.Close();
return result;
}
internal static void KillUpdate()
{
Process[] ps = Process.GetProcessesByName("QMProxyAccUpdate");
foreach (Process p in ps)
{
try { p.Kill(); } catch { }
}
}
internal static void StartJsq(string jsq)
{
if (Process.GetProcessesByName("QMProxyAcceler").Length == 0)
{
Process.Start(jsq, "/entry=InstallDir");
}
}
internal static string Injection()
{
Process[] ps = Process.GetProcessesByName("QMProxyAcceler");
if (ps.Length == 0)
{
return "没有找到QMProxyAcceler进程!";
}
Process p = ps[0];
IntPtr processHandle = NativeMethods.OpenProcess(2035711u, false, p.Id);
if (processHandle == IntPtr.Zero)
{
return "打开进程QMProxyAcceler失败!";
}
IntPtr baseAddress = p.MainModule.BaseAddress;
WriteInt(processHandle, baseAddress, 1139712, 1);
WriteInt(processHandle, baseAddress, 1151216, 2);
WriteInt(processHandle, baseAddress, 1152304, 0);
WriteInt(processHandle, baseAddress, 1152312, 3);
WriteInt(processHandle, baseAddress, 1152316, GetLongTime());
WriteInt(processHandle, baseAddress, 1153660, 1);
NativeMethods.CloseHandle(processHandle);
return "已破解,请点击头像查看到期时间!";
}
static long GetLongTime()
{
DateTime current = new DateTime(2099, 12, 12, 12, 12, 12);
DateTime dt0 = new DateTime(1970, 1, 1, 0, 0, 0, 0);
return (current.Ticks - dt0.Ticks) / 10000 / 1000;
}
static void WriteInt(IntPtr processHandle, IntPtr baseAddress, int offset, long value)
{
byte[] bytes = BitConverter.GetBytes(value);
NativeMethods.WriteProcessMemory(processHandle, IntPtr.Add(baseAddress, offset), bytes, new IntPtr(bytes.Length), IntPtr.Zero);
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。