Workflow. Net:
Workflow. net. Security. Client. dll
Workflow. net. Security. Client. Serialnumbers. verifyserial (string): Boolean
Workflow. net. Security. Client. Serialnumbers. ef67a97d2333c1cd
(String, string &, string &): Boolean
You shoshould let them do nothing and return "true ";
========================================================== ====================
Macrobject. nobject
Macrobject.1.2 (): void -----> let it do nothing and return.
If you found the following code, you will found above function. They are in one class
Macrobject.1.1 (): void
. Method Assembly hidebysig static void 1 () cel managed {. maxstack 8 l_0000: BR. s l_0016 l_0002: brtrue. s l_0009 l_0004: Call void macrobject.1: 2 () l_0009: lds1_int32 macrobject.1: 1 l_000e: LDC. i4.1 l_000f: Add l_0010: sts0000int32 macrobject.1: 1 l_0015: Ret l_0016: lds0000int32 macrobject.1: 1 l_001b: BR. s l_0002} |
========================================================== ==============
Aspnetemail:
Aspnetemail. xml. LIC:
Extract the string: 1.1 evaluation license3aspnetemail2007-01-21
Compute MD5 value of it, and save in <H2> section.
Finally, create signature for this XML file.
Code:
Static string y111 =
"Jvxrzv + jhn2gygqew0ramp + owhtzvbhongca" +
"/Yfyjfnitmwwz0pqv8l3dswqovdfzf/f7xltu5h" +
"G8qrfk87jxq6jxyjzfpc5zww + fuav5/kix6ye3snsz" +
"Hmwr9axtjztnjxxxb5n/vjsfhuwaqismj5axyq" +
"Scrcp3vde1vcnbzuz/lmtryrevjpwklraekqq7aago" +
"Pojkwtduzcv1htivq1yafzelzacxqzsp1osj6yxbo" +
"Farkukrmojah8vujh7 + ubgo9ufb/cmpjqg + efasns" +
"Pqhewenxggtn7i6k + r51gimgw9gtg/at6urmzbc" +
"Mu0olzk2zrmdm + D + hnlnagq = ";
Static string y211 = "rpkh + gyk4wa + d8yriglwrtvf18cz04rhn87wvjrgefg = ";
Static string y311 = "exgjmz5b9yu7mhurx7a7ra = ";
Static bool bool111 = false;
Static string y411 = "7lyd7zis7bso ";
Static string y511 = "7pcl7qyz74iu76si ";
Private void buttonpath_click (Object sender, eventargs E)
{
String text1 = appdomain. currentdomain. basedirectory + "aspnetemail. xml. Lic ";
// Textbox1.text = text1;
// MessageBox. Show (file. exists (text1). tostring ());
Xmldocument Document1 = new xmldocument ();
Document1.load (text1 );
Signedxml xml1 = new signedxml (Document1 );
Try
{
Xmlnode node1 = document1.getelementsbytagname ("signature ",
Http://www.w3.org/2000/09/xmldsig#) [0];
Xml1.loadxml (xmlelement) node1 );
}
Catch
{
}< br> If (xml1.checksignature (rsa111 ()
{< br> MessageBox. show ("OK");
}< br> else
{< br> MessageBox. show ("false");
}
Textbox1.text = ds111 (dd311 (text1 ));
Ds211 (text1 );
}
Private Static rsacryptoserviceprovider rsa111 () // Create RSA provider for signature
{
String str311 = "AI" + "aspnetemail" + "3 ";
Rsacryptoserviceprovider provider1 = NULL;
Try
{
Cspparameters parameters1 = new cspparameters ();
Parameters1.keycontainername = "aiaspnetemail3 ";
Parameters1.flags = cspproviderflags. usemachinekeystore;
Provider1 = new rsacryptoserviceprovider (parameters1 );
}
Catch
{
Try
{
Cspparameters parameters2 = new cspparameters ();
Parameters2.flags = cspproviderflags. usemachinekeystore;
Provider1 = new rsacryptoserviceprovider (parameters2 );
}
Catch
{
Try
{
Provider1 = new rsacryptoserviceprovider ();
}
Catch
{
}
}
}
If (provider1 = NULL)
{
MessageBox. Show ("");
}
Return provider1;
}
Private Static string ds111 (Dataset set1) // Get the license string
{
String text1 = string. empty;
If (set1.tables ["customer"]! = NULL)
{
Text1 = set1.tables ["customer"]. Rows [0] ["name"]. tostring (). Trim ();
}
If (set1.tables ["product"]! = NULL)
{
Foreach (datarow row1 in set1.tables ["product"]. Rows)
{
Text1 = text1 + row1 ["version"]. tostring (). Trim ();
Text1 = text1 + row1 ["name"]. tostring (). Trim ();
Text1 = text1 + row1 ["expires"]. tostring (). Trim ();
}
}
Return text1;
}
Private Static dataset dd311 (string text1)// Read the XML to Dataset
{
Dataset set1 = new dataset ();
// Stringreader reader1 = new stringreader (text1 );
Set1.readxml (text1 );
// Reader1.close ();
Return set1;
}
Private Static dataset ds211 (string text5)// Check MD5 value, and judgement the LIC was edited whether or not
{
Dataset set1 = dd311 (text5 );
Datatable Table1 = set1.tables ["licenseinformation"];
If (Table1! = NULL) & (table1.rows. Count> 0 ))
{
Datarow row1 = table1.rows [0];
String text1 = row1 ["version"]. tostring ();
Double num1 = double. parse (text1 );
If (num1> 1)
{
String text2 = row1 ["h1"]. tostring ();
String text3 = row1 ["h2"]. tostring ();
Text1 = text1 + ds111 (set1 );
Hashalgorithm algorithm1 = NULL;
If (text2 = "0 ")
{
Algorithm1 = new md5cryptoserviceprovider ();
}
String text4 = str111 (text1, algorithm1 );
If (text4! = Text3)
{
Throw new exception ("invalid license hash found .");
}
Return set1;
}
Return NULL;
}
Return NULL;
}
Private Static string str111 (string text2, hashalgorithm algorithm1)
{
Byte [] buffer1 = convert. frombase64string (y411 );
Byte [] buffer2 = encoding. utf8.getbytes (text2 );
Byte [] buffer3 = convert. frombase64string (y511 );
Byte [] buffer4 = new byte [(buffer1.length + buffer2.length) + buffer3.length];
Buffer1.copyto (buffer4, 0 );
Buffer2.copyto (buffer4, buffer1.length );
Buffer3.copyto (buffer4, buffer1.length + buffer2.length );
Byte [] buffer5 = algorithm1.computehash (buffer4 );
Return convert. tobase64string (buffer5 );
}
^-^, I think you can finish the leavings work.
Any question, please email me:Liuxzh1026@126.com