游戏破解方法一
发现游戏下载完安装后还需要再次激活抓包发现 联网获取游戏的 encodeKey 来解压游戏启动文件、而每次把客户端游戏启动程序一关闭又会删除原本的游戏启动文件(解压完的游戏文件默认是隐藏的需要电脑设置查看隐藏文件才看得见),获取游戏的encodeKeyapi为:http://yx.haisenyouxi8.com/hsgame/game/getById(post请求 id=hsgame.ini文件里面的id),通过hsgame_client.dll里面来判断是否登录或激活
游戏破解方法二【C#】
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Net;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Web.Script.Serialization;
- using System.Windows.Forms;
- namespace GameDLL
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string id = ReadConfig<string>(".\\hsgame.ini", "config", "id");
- string result = null;
- try
- {
- result = getGameData(id);
- analysis(result);
- }
- catch (Exception)
- {
- MessageBox.Show("需要联网下载encodeKey和赠品地址");
- }
- }
- private void getExe(string key) {
- string exename = ReadConfig<string>(".\\hsgame.ini", "config", "exeName");
- FileStream fileStream = new FileStream(".\\hsgame.dll", FileMode.Open, FileAccess.Read);
- BinaryReader binaryReader = new BinaryReader(fileStream);
- FileStream fileStream2 = new FileStream(".\\" + exename, FileMode.CreateNew);
- bool flag = binaryReader.PeekChar() != -1;
- if (flag)
- {
- byte[] array;
- while ((array = binaryReader.ReadBytes(1024)).Length != 0)
- {
- fileStream2.Write(decodeByte(array, key), 0, array.Length);
- }
- }
- fileStream2.Close();
- binaryReader.Close();
- fileStream.Close();
- }
- private static byte[] decodeByte(byte[] bytes, string key)
- {
- byte[] bytes2 = Encoding.UTF8.GetBytes(key);
- for (int i = 0; i < bytes.Length; i++)
- {
- foreach (byte b in bytes2)
- {
- bytes[i] ^= b;
- }
- }
- return bytes;
- }
- public static T ReadConfig<T>(string FileName, string section, string key)
- {
- bool flag = File.Exists(FileName);
- T result;
- if (flag)
- {
- string text = ReadContentValue(section, key);
- bool flag2 = text == null || string.IsNullOrEmpty(text.Trim());
- if (flag2)
- {
- result = default(T);
- }
- else
- {
- bool isEnum = typeof(T).IsEnum;
- if (isEnum)
- {
- result = (T)((object)Enum.Parse(typeof(T), text, true));
- }
- else
- {
- result = (T)((object)Convert.ChangeType(text, typeof(T)));
- }
- }
- }
- else
- {
- result = default(T);
- }
- return result;
- }
- [DllImport("kernel32")]
- private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retval, int size, string filePath);
- public static string ReadContentValue(string Section, string key)
- {
- StringBuilder stringBuilder = new StringBuilder(1024);
- GetPrivateProfileString(Section, key, "", stringBuilder, 1024, ".\\hsgame.ini");
- return stringBuilder.ToString();
- }
- private string getGameData(string id) {
- string url = "http://yx.haisenyouxi8.com/hsgame/game/getById";
- HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
- req.Method = "POST";
- req.ContentType = "application/x-www-form-urlencoded";
- byte[] data = Encoding.UTF8.GetBytes("id="+id);
- req.ContentLength = data.Length;
- using (Stream reqStream = req.GetRequestStream())
- {
- reqStream.Write(data, 0, data.Length);
- reqStream.Close();
- }
- HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
- Stream stream = resp.GetResponseStream();
- string result = null;
- //获取内容
- using (StreamReader reader = new StreamReader(stream, Encoding.UTF8))
- {
- result = reader.ReadToEnd();
- }
- Console.WriteLine(result);
- return result;
- }
- private void analysis(string json) {
- JavaScriptSerializer serializer = new JavaScriptSerializer();
- Dictionary<string, Object> o = (Dictionary<string, Object>)serializer.DeserializeObject(json);
- Dictionary<string, Object> o2 = (Dictionary<string, Object>)o["json"];
- Object encodeKey = o2["encodeKey"];
- Object giftUrl = o2["giftUrl"];
- getExe(encodeKey.ToString());
- openBrowser(giftUrl.ToString());
- }
- private void openBrowser(string url) {
- if (url == null || url.Trim().Length <= 0)
- {
- MessageBox.Show("没有赠品");
- }
- else {
- System.Diagnostics.Process.Start(url);
- MessageBox.Show("赠品地址已经打开 记得保存哦");
- }
- }
- }
- }
客户端破解说明
客户端移除了每次启动强制更新以及账号登录功能 目前客户端有778个游戏,不过每次客户端启动贼慢要去服务器端获取数据通过抓包发现了获取游戏的api(http://yx.haisenyouxi8.com/hsgame/game/query/(POST请求 没有参数))获取到所有游戏 json格式,返回的数据有用的为::downloadUrl:游戏下载地址,giftUrl:赠品下载地址(修改器存档之类的东西)、encodeKey: 解密游戏的key
使用说明
以下文件自选其一使用
海森游戏VIP客户端:下载海森游戏VIP客户端解压后打开hsgame_query1.exe即可
hsgame_client.dll:复制到程序根目录替换即可
GameDLL.exe:拷贝到安装游戏后桌面创建的快捷方式文件所在目录运行直接解压就可以
附件下载
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
66666
大神感谢666
先试试看
henbuc
怎么评论了还是下载不了啊
h
haobangyo
为人民服务
666666 大哥还是牛逼的
6666