【Catchyrime】(2016-03-24 更新)Aspose.Cells 8.6.3 - 8.7.1 破解
本帖最后由 catchyrime 于 2016-3-24 21:26 编辑最近做 .net 做得有点多诶。。。
Aspose.Cells 是一个 Excel 文件的读写库
Aspose 还有一大堆其他的库(Work,PPT,PDF,Mail,...),破解应该是差不多的,不过我现在只用到这个啦~
Aspose 官网:http://www.aspose.com/
Aspose.Cells 官网:http://www.aspose.com/.net/excel-component.aspx
注意:以下代码只保证适用于 Aspose.Cells, 8.6.3 - 8.7.1 其他版本的文件我没看!
只需在使用之前运行一次这段 Hot Patch 即可
internal static void InitializeAsposeCells()
{
const BindingFlags BINDING_FLAGS_ALL = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;
const string CLASS_LICENSER = "\u0092\u0092\u0008.\u001C";
const string CLASS_LICENSERHELPER = "\u0011\u0001\u0006.\u001A";
const string ENUM_ISTRIAL = "\u0092\u0092\u0008.\u001B";
const string FIELD_LICENSER_CREATED_LICENSE = "\u0001"; // static
const string FIELD_LICENSER_EXPIRY_DATE = "\u0002"; // instance
const string FIELD_LICENSER_ISTRIAL = "\u0001"; // instance
const string FIELD_LICENSERHELPER_INT128 = "\u0001"; // static
const string FIELD_LICENSERHELPER_BOOLFALSE = "\u0001"; // static
const int CONST_LICENSER_ISTRIAL = 1;
const int CONST_LICENSERHELPER_INT128 = 128;
const bool CONST_LICENSERHELPER_BOOLFALSE = false;
//- Field setter for convinient
Action<FieldInfo, Type, string, object, object> setValue =
delegate(FieldInfo field, Type chkType, string chkName, object obj, object value) {
if ((field.FieldType == chkType) && (field.Name == chkName)) {
field.SetValue(obj, value);
}
};
//- Get types
Assembly assembly = Assembly.GetAssembly(typeof(Aspose.Cells.License));
Type typeLic = null, typeIsTrial = null, typeHelper = null;
foreach (Type type in assembly.GetTypes()) {
if ((typeLic == null) && (type.FullName == CLASS_LICENSER)) {
typeLic = type;
}
else if ((typeIsTrial == null) && (type.FullName == ENUM_ISTRIAL)) {
typeIsTrial = type;
}
else if ((typeHelper == null) && (type.FullName == CLASS_LICENSERHELPER)) {
typeHelper = type;
}
}
if (typeLic == null || typeIsTrial == null || typeHelper == null) {
throw new Exception();
}
//- In class_Licenser
object license = Activator.CreateInstance(typeLic);
foreach (FieldInfo field in typeLic.GetFields(BINDING_FLAGS_ALL)) {
setValue(field, typeLic, FIELD_LICENSER_CREATED_LICENSE, null, license);
setValue(field, typeof(DateTime), FIELD_LICENSER_EXPIRY_DATE, license, DateTime.MaxValue);
setValue(field, typeIsTrial, FIELD_LICENSER_ISTRIAL, license, CONST_LICENSER_ISTRIAL);
}
//- In class_LicenserHelper
foreach (FieldInfo field in typeHelper.GetFields(BINDING_FLAGS_ALL)) {
setValue(field, typeof(int), FIELD_LICENSERHELPER_INT128, null, CONST_LICENSERHELPER_INT128);
setValue(field, typeof(bool), FIELD_LICENSERHELPER_BOOLFALSE, null, CONST_LICENSERHELPER_BOOLFALSE);
}
}
没看出破解了什么,就贴了个代码 wyqzm 发表于 2016-1-18 11:13
这个应该是怎么用的呢,使用代码之前调用吗?
是的,在调用Aspose之前调用
之后不要调用 Aspose.Cells.License.SetLicense()
看看效果了 感谢分享加油 不错,大牛的东西太高深了,佩服,牛牛牛 这个应该是怎么用的呢,使用代码之前调用吗? Aspose.Slides.dll 16.4也可以用这方法吗? 能给出一些分析过程吗?看不明白。。{:1_931:} 方法很有效,大赞一个
楼主能否分析下Aspose.Words? 没有分析过程,看不太懂
页:
[1]
2