Reflector.exe + ilDasm.exe + ilasm.exe 破解DundasWebChart(VS2005) 5.5 成功
Reflector.exe + ilDasm.exe + ilasm.exe 破解DundasWebChart(VS2005) 5.5 成功
1. 工具准备
.net FrameWork SDK 2.0
ILDASM反编译工具
ILASM重新编译工具
2. 安装Dundas Chart for ASP.NET -
3. 用Reflector.exe 找开 DundasWebChart 分析其水印的方法
public void Paint(Graphics graph, bool paintTopLevelElementOnly, RenderingType renderingType, XmlTextWriter svgTextWriter, Stream flashStream, string documentTitle, bool resizable, bool preserveAspectRatio)
{
………………………..
//注意:不管如何都会在Chart是绘制水印字符串,这很简单,将this.e=true 改为this.e=false;就可以了.
this.e = true;
if (this.e)
{
StringFormat format1 = new StringFormat();
format1.Alignment = StringAlignment.Center;
format1.LineAlignment = StringAlignment.Center;
SolidBrush brush1 = new SolidBrush(Color.FromArgb(40, 0, 0, 0xaf));
SolidBrush brush2 = new SolidBrush(Color.FromArgb(40, 200, 200, 200));
Font font1 = new Font(ChartPicture.a(),
SizeF ef3 = this.a.GetRelativeSize(new SizeF(
//水印字符串
string text1 = cP.a("\u14ad\u14de\u14d7\u14cd\u14ca\u14dc\u1489\u
this.a.a(text1, font1, brush2, new RectangleF(
this.a.a(text1, font1, brush1, new RectangleF(
…………………………
}
4. 打开ILDASM 载入DundasWebChart.dll文件,然后转储到指定文件夹中
打开DundasWebchart.il 找到绘画水印的位置
如下:
// IL_0b
IL_0b
IL_0b1b: callvirt instance void [System.Drawing]System.Drawing.StringFormat::set_Alignment(valuetype [System.Drawing]System.Drawing.StringAlignment)
IL_0b20: ldloc.s V_24
IL_0b22: ldc.i4.1
保存,重新编译
ilasm /dll /RESOURCE=DundasWebChart.res DundasWebChart.il
覆盖到D:\Program Files\Dundas Software\Charting\WebControlVS2005\Samples\bin目录