DundasWebChart 5.5 破解续.

1.Reflector.exe + ilDasm.exe + ilasm.exe 破解DundasWebChart(VS2005) 5.5 成功

上篇介绍的破解方法可以去除图片中的水印并且不稳定,但是无法去除falsh中的水印.
后来继续分析出了其破解方法,可以完全实现DundasWebChart的破解,方法如下:
1.分析Dundas.Charting.WebControl.ChartLicenseProvider中方法 iskeyvalid

None.gif protected   virtual   bool  IsKeyValid( string  key, Type type)
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif      dot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gif
InBlock.gif            
if (((textArray1.Length >= 2&& (textArray1[1== Chart.b)) && (textArray1[1== this.a()))
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif  
//将返回的false 改为 true
InBlock.gif
                  return false;
ExpandedSubBlockEnd.gif            }

ExpandedBlockEnd.gif      }

None.gif      
return   true ;
None.gif}
None.gif


2.取消绘画的水印.

Dundas.Charting.WebControl.ChartPicture 中方法

None.gif public   void  Paint(Graphics graph,  bool  paintTopLevelElementOnly, RenderingType renderingType, XmlTextWriter svgTextWriter, Stream flashStream,  string  documentTitle,  bool  resizable,  bool  preserveAspectRatio)
ExpandedBlockStart.gifContractedBlock.gif
dot.gif {
InBlock.gif dot.gifdot.gifdot.gif
InBlock.gif     
this.OnAfterPaint(new ChartPaintEventArgs(this.a, this.a, new ElementPosition(0f, 0f, 100f, 100f)));
InBlock.gif            
foreach (ChartArea area9 in this.a)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                  
if (area9.Visible)
ExpandedSubBlockStart.gifContractedSubBlock.gif                  
dot.gif{
InBlock.gif                        area9.a();
InBlock.gif                        area9.d();
ExpandedSubBlockEnd.gif                  }

ExpandedSubBlockEnd.gif            }

InBlock.gif     
//由于为真,会每次都会重画水印,设置为false 即可. 将this.e=true;改为 graph.e=false;
InBlock.gif
            this.e = true;
InBlock.gif            
if (graph.e)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
dot.gif{
InBlock.gif                  StringFormat format1 
= new StringFormat();
InBlock.gif                  format1.Alignment 
= StringAlignment.Near;
InBlock.gif                  format1.LineAlignment 
= StringAlignment.Near;
InBlock.gif                  SolidBrush brush1 
= new SolidBrush(Color.FromArgb(40110xaf));
InBlock.gif                  SolidBrush brush2 
= new SolidBrush(Color.FromArgb(40200200200));
InBlock.gif                  Font font1 
= new Font(ChartPicture.a(), 8f);
InBlock.gif                  SizeF ef3 
= this.a.GetRelativeSize(new SizeF(2f, 2f));
InBlock.gif  dot.gif.
ExpandedSubBlockEnd.gif}

InBlock.gif


利用 ildasm  反编辑程序集.
1.修改 IsKeyValid 的返回值

 

None.gif  .method family hidebysig newslot  virtual  
None.gif          instance 
bool   IsKeyValid( string  key,
None.gif                                    
class  [mscorlib]System.Type  ' type ' ) cil managed
ExpandedBlockStart.gifContractedBlock.gif  
dot.gif {
InBlock.gif    dot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gifdot.gif.
InBlock.gif
InBlock.gif    IL_0091:  ldc.i4.
1
InBlock.gif    IL_0092:  ret
InBlock.gif
InBlock.gif    IL_0093:  ldc.i4.
0   //将其修改为 ldc.i4.1
InBlock.gif
    IL_0094:  ret
InBlock.gif
InBlock.gif    IL_0095:  ldc.i4.
0   //将其修改为 ldc.i4.1
InBlock.gif
    IL_0096:  ret
ExpandedBlockEnd.gif  }
 
None.gif
None.gif


2.修改Paint 方法.
找到方法位置如下:

None.gif  IL_0aff:  ldarg. 0
None.gif      IL_0b00:  ldc.i4.
1
None.gif      IL_0b01:  stfld      
bool  Dundas.Charting.WebControl.ChartPicture::e
None.gif      IL_0b06:  ldarg.
0
None.gif      IL_0b07:  ldfld      
bool  Dundas.Charting.WebControl.ChartPicture::e
None.gif      IL_0b0c:  brfalse    IL_0bfb
None.gif
None.gif      IL_0b11:  newobj     instance 
void  [System.Drawing]System.Drawing.StringFormat::.ctor()
None.gif      IL_0b16:  stloc.s    V_24
None.gif      IL_0b18:  ldloc.s    V_24
None.gif      IL_0b1a:  ldc.i4.
1
None.gif      IL_0b1b:  callvirt   instance 
void  [System.Drawing]System.Drawing.StringFormat::set_Alignment(valuetype [System.Drawing]System.Drawing.StringAlignment)
None.gif      IL_0b20:  ldloc.s    V_24
None.gif      IL_0b22:  ldc.i4.
1
None.gif      IL_0b23:  callvirt   instance 
void  [System.Drawing]System.Drawing.StringFormat::set_LineAlignment(valuetype [System.Drawing]System.Drawing.StringAlignment)
None.gif      IL_0b28:  ldc.i4.s   
40
None.gif      IL_0b2a:  ldc.i4.
0
None.gif      IL_0b2b:  ldc.i4.
0
None.gif      IL_0b2c:  ldc.i4     
0xaf
None.gif      IL_0b31:  call       valuetype [System.Drawing]System.Drawing.Color [System.Drawing]System.Drawing.Color::FromArgb(int32,
None.gif                
None.gif
None.gif


     将以上代码修改为下面的il 代码.

 

None.gif IL_0aff:  ldarg. 1
None.gif      IL_0b00:  ldc.i4.
0
None.gif      IL_0b01:  stfld      
bool  Dundas.Charting.WebControl.ChartPicture::e
None.gif      IL_0b06:  ldarg.
1
None.gif      IL_0b07:  ldfld      
bool  Dundas.Charting.WebControl.ChartPicture::e
None.gif      IL_0b0c:  brfalse    IL_0bfb
None.gif      
None.gif      IL_0b11:  newobj     instance 
void  [System.Drawing]System.Drawing.StringFormat::.ctor()
None.gif      IL_0b16:  stloc.s    V_24
None.gif      IL_0b18:  ldloc.s    V_24
None.gif      
// 破解方法在此 
None.gif
      IL_0b1a:  ldc.i4. 0
None.gif      IL_0b1b:  callvirt   instance 
void  [System.Drawing]System.Drawing.StringFormat::set_Alignment(valuetype [System.Drawing]System.Drawing.StringAlignment)
None.gif      IL_0b20:  ldloc.s    V_24
None.gif      IL_0b22:  ldc.i4.
0
None.gif      IL_0b23:  callvirt   instance 
void  [System.Drawing]System.Drawing.StringFormat::set_LineAlignment(valuetype [System.Drawing]System.Drawing.StringAlignment)
None.gif      IL_0b28:  ldc.i4.s   
40
None.gif      IL_0b2a:  ldc.i4.
1
None.gif      IL_0b2b:  ldc.i4.
1
None.gif      IL_0b2c:  ldc.i4     
0xaf
None.gif      IL_0b31:  call       valuetype [System.Drawing]System.Drawing.Color [System.Drawing]System.Drawing.Color::FromArgb(int32,
None.gif                  

         重新进行编译 ilasm /dll /RESOURCE=DundasWebChart.res DundasWebChart.il 
 OK,大功告成
/Files/wangzhq/DundasWebChart2006-11-15.rar

转载于:https://www.cnblogs.com/wangzhq/archive/2006/11/09/555405.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值