Dundaswebchart 5.5 cracking continued.

Source: Internet
Author: User

1.reflector.exe + ildasm.exe + ilasm.exe cracking dundaswebchart (vs2005) 5.5 successful

The method described in the previous article can remove the watermark from the image and it is unstable, but it cannot remove the watermark from falsh.
Later, I analyzed the method to crack dundaswebchart. The method is as follows:
1. Analyze the iskeyvalid method in Dundas. charting. webcontrol. chartlicenseprovider

Protected   Virtual   Bool Iskeyvalid ( String Key, type)
{

If (Textarray1.length > =   2 ) && (Textarray1 [ 1 ] = Chart. B )) && (Textarray1 [ 1 ] =   This . ()))
{
//Change the returned false value to true.
Return False;
}
}
Return   True ;
}

2. Cancel the watermark for painting.

Dundas. charting. webcontrol. chartpicture Method

Public   Void Paint (Graphics graph, Bool Painttoplevelelementonly, renderingtype, xmltextwriter svgtextwriter, stream flashstream, String Documenttitle, Bool Resizable, Bool Preserveaspectratio)
{
 
This . Onafterpaint ( New Chartpainteventargs ( This ., This ., New Elementposition (0f, 0f, 100f, 100f )));
Foreach (Chartarea area9 In   This .)
{
If (Area9.visible)
{
Area9.a ();
Area9.d ();
}
}
// Because it is true, the watermark will be re-painted every time. set this to false. Change this. E = true to graph. E = false;
This . E =   True ;
If (Graph. e)
{
Stringformat format1 =   New Stringformat ();
Format1.alignment = Stringalignment. Near;
Format1.linealignment = Stringalignment. Near;
Solidbrush brush1 =   New Solidbrush (color. fromargb ( 40 , 1 , 1 , 0xaf ));
Solidbrush brush2 =   New Solidbrush (color. fromargb ( 40 , 200 , 200 , 200 ));
Font font1 =   New Font (chartpicture. A (), 8f );
Sizef EF3 =   This . A. getrelativesize ( New Sizef (2f, 2f ));
.
}

Unedit using ildasmProgramSet.
1. Modify the return value of iskeyvalid

 

. Method family hidebysig newslot Virtual  
Instance Bool Iskeyvalid ( String Key,
Class [Mscorlib] system. Type ' Type ' ) Pencil managed
{
.

Il_0091: LDC. i4. 1
Il_0092: Ret

Il_0093: LDC. i4. 0 // Change it to LDC. i4.1
Il_0094: Ret

Il_0095: LDC. i4. 0 // Change it to LDC. i4.1
Il_0096: Ret
}  

2. Modify the paint method.
The method is as follows:

Il_0aff: ldarg. 0
Il_0b00: LDC. i4. 1
Il_0b01: stfld Bool Dundas. charting. webcontrol. chartpicture: E
Il_0b06: ldarg. 0
Il_0b07: ld1 _ Bool Dundas. charting. webcontrol. chartpicture: E
Il_0b0c: brfalse il_0bfb

Il_0b11: newobj instance Void [System. Drawing] system. Drawing. stringformat:. ctor ()
Il_0f8: stloc. s v_24
Il_0b18: ldloc. s v_24
Il_0b1a: LDC. i4. 1
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
Il_0b23: callvirt instance Void [System. Drawing] system. Drawing. stringformat: set_linealignment (valuetype [system. Drawing] system. Drawing. stringalignment)
Il_0b28: LDC. i4.s 40
Il_0b2a: LDC. i4. 0
Il_0b2b: LDC. i4. 0
Il_0b2c: LDC. I4 0xaf
Il_0b31: Call valuetype [system. Drawing] system. Drawing. Color [system. Drawing] system. Drawing. Color: fromargb (int32,


Replace the aboveCodeModify it to the following il code.

 

Il_0aff: ldarg. 1
Il_0b00: LDC. i4. 0
Il_0b01: stfld Bool Dundas. charting. webcontrol. chartpicture: E
Il_0b06: ldarg. 1
Il_0b07: ld1 _ Bool Dundas. charting. webcontrol. chartpicture: E
Il_0b0c: brfalse il_0bfb

Il_0b11: newobj instance Void [System. Drawing] system. Drawing. stringformat:. ctor ()
Il_0f8: stloc. s v_24
Il_0b18: ldloc. s v_24
// The attack method is as follows:
Il_0b1a: LDC. i4. 0
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. 0
Il_0b23: callvirt instance Void [System. Drawing] system. Drawing. stringformat: set_linealignment (valuetype [system. Drawing] system. Drawing. stringalignment)
Il_0b28: LDC. i4.s 40
Il_0b2a: LDC. i4. 1
Il_0b2b: LDC. i4. 1
Il_0b2c: LDC. I4 0xaf
Il_0b31: Call valuetype [system. Drawing] system. Drawing. Color [system. Drawing] system. Drawing. Color: fromargb (int32,

Recompile ilasm/dll/resource = dundaswebchart. Res dundaswebchart. Il
OK, success
/Files/wangzhq/DundasWebChart2006-11-15.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.