asp.net|treeview| Strategy | Cracked recently the more popular ASP.net treeview control performance Test. such as Radtreeview,flytreeview,iewebcontroltreeview and so on. Overall feeling, as an independent product, the appearance of Flytreeview is more beautiful, the performance is the most abundant, can be described as fine carving. Using it to traverse the server hard drive, the simulation Explorer directory is very fast; it has a unique asynchronous loading function, for programmers who dream of tying all the data to a web tree without impacting the client loading speed, Flytreeview can make us fish and paws. After a period of Iewebcontroltreeview, deeply its performance of the flat, slow reaction, so a see flytreeview for ASP.net 3.1 will fondle admiringly, Flytreeview for ASP.net 3.2 When they came out, they immediately downloaded one. Because after the probation period must adjust "landline" system time to continue to use, feel very inconvenient, then decided to do their own, extend the probation period, but also take the opportunity to learn the skills of excellent software, learn some books on the knowledge.
I. Environmental preparedness
1. Basic Environment: Microsoft Visual Studio. NET 200X Development environment and IIS services.
2. Path environment: To facilitate the use of tools on the command line, you need to ensure that you update the system's path environment variables. So that the system can find what it needs in any directory. NET Tools. To do this, you need to X:\Program Files\Microsoft Visual Studio. NET 2003 Dk\v1.1\bin and X:\winnt\Microsoft.NET\Framework\ v1.1.4322 (v1.0.3705) The full path to the two directories is added to the end of the PATH environment variable string, as shown in (Figure I):
In addition, to ensure that you can access the command line in any directory, you must add a shortcut option to the folder's right-click menu to enter the command line. See the method (Figure II). In this way, when you right-click on a folder that needs to go to the command line in the Explorer, you will see a picture of figure three, select "Go to command line" and eliminate the tedious process of manually typing the full path (figure III). Second, tool preparation
1, anti-compiler: Code analysis Tools I use the Reflector 4.1.6.0 trial version, can download the latest version from http://www.aisto.com/roeder/dotnet/, Reflector can be the target code decompile into IL, C #, VB . NET, Delphi Four languages, you can choose according to your own language habits. Reflector Trial Version If there is an expiration problem, you can adjust the system clock to resolve, of course, you can also try to use the Reflector of their own Reflector code analysis of the problem solved, but does not affect our follow-up work. The tool that compiles the control completely into a cracked file uses the existing Microsoft free MSIL Disassembler ildasm available in the environment. After the first step of preparation, we can already call it in any directory when needed.
2. Assembler: Use the existing Microsoft free MSIL Assembler Ilasm in the environment to generate the final cracked control by using Ilasm.exe to run our cracked ildasm generated files. As with ILDASM, after the first step of preparation, we can already call it in any directory when needed.
3, other tools: Notepad, calculator, etc., are the system's default tools, software. Iii. the process of cracking
1, install Flytreeview: Run Flytreeview_for_asp_setup.3.2.exe, and note the installation process to select the installation of the sample Web application. such as (Figure IV): Browsing the sample page in a browser, the normal image of the control when it is not expired (Figure V):
Once the system clock is adjusted backwards (for example, one year), the control throws an exception immediately as follows (Figure VI):
2, Control Analysis:
Create a new folder in your favorite location, let's name it "Flytreeview crack" as our working directory , copy the NineRays.Web.UI.WebControls.FlyTreeView.dll from the sample site Bin directory to the working directory, and then create two more batch files in our working directory with Notepad to facilitate subsequent work with the following code: MYILDASM.BATILDASM NineRays.Web.UI.WebControls.FlyTreeView.dll
/output:ninerays.web.ui.webcontrols.flytreeview.il Myilasm.batilasm/dll/resource: NineRays.Web.UI.WebControls.FlyTreeView.res
/output:ninerays.web.ui.webcontrols.flytreeview.dll/key:treekey.snk
NineRays.Web.UI.WebControls.FlyTreeView.il
When basically ready, start Reflector to open the NineRays.Web.UI.WebControls.FlyTreeView.dll in the working directory, such as (Figure Seven)
Based on previous hacking experience and previous cracking of Flytreeview for ASP.net 3.1, the trial restrictions for Web controls are usually implemented in locations such as New,render,init. To do this, we expand the Flytreeview class directly in NineRays.Web.UI.WebControls.FlyTreeView to the exception information thrown in (Figure VI) "9rays.net Flytreeview for asp.net TRIAL license has expired. "For clues, browse through the collection of key methods and functions in the class, and find that the exception is thrown in the constructor new () of the Flytreeview class, with the high-level language code as follows:
C # code VB. NET code public Flytreeview ()
{
This._designpage = null;
This._clientruntimepath = "/aspnet_client/ninerays_web_
Ui_webcontrols_flytreeview_3_2_83_3/";
This._loadingmessage = "Loading ...";
This._expandlevel = 0;
This._childindent = 0x12;
This._supportie55 = false;
This._oldselectednodekeylist = null;
This._restorevalue = null;
This._defaultnodetype = null;
This._nodeeventsargs = new ArrayList ();
This._selectednode = null;
if (DateTime.Now > Global.trial_expire_date)
{
throw new Exception ("9rays.net Flytreeview
For ASP.net TRIAL license has expired. ");
}
This._nodetypes = new Treenodetypecollection ();
This._nodetypes._flytreeview = this;
This. Font.Name = "Tahoma";
This. Font.Size = Fontunit.xsmall;
This. BorderStyle = BorderStyle.None;
This. Clientruntimepath = "/aspnet_client/ninerays_web_
Ui_webcontrols_flytreeview_3_2_83_3/";
}
Public Sub New ()
Me._designpage = Nothing
Me._clientruntimepath = "/aspnet_client/ninerays_web_
ui_webcontrols_flytreeview_3_2_83_3/"
Me._loadingmessage = "Loading ..."
Me._expandlevel = 0
Me._childindent = 18
Me._supportie55 = False
Me._oldselectednodekeylist = Nothing
Me._restorevalue = Nothing
Me._defaultnodetype = Nothing
Me._nodeeventsargs = New ArrayList
Me._selectednode = Nothing
If (DateTime.Now > Global.trial_expire_date) Then
Throw New Exception ("9rays.net Flytreeview
For ASP.net TRIAL license has expired. ")
End If
Me._nodetypes = New treenodetypecollection
Me._nodetypes._flytreeview = Me
Me.Font.Name = "Tahoma"
Me.Font.Size = Fontunit.xsmall
Me.borderstyle = BorderStyle.None
Me.clientruntimepath = "/aspnet_client/ninerays_web
_ui_webcontrols_flytreeview_3_2_83_3/"
End Sub related screenshots see (Figure Eight):
Obviously, the key code is: If (DateTime.Now > Global.trial_expire_date) Then
Throw New Exception ("9rays.net flytreeview for asp.net TRIAL license has expired.")
End If Global.trial_expire_date should be the final limit of the control trial, so long as we extend the term value in global.trial_expire_date for a certain period of time, we can achieve the requirement of cracking, Because we are not going to do the registration machine for the control, we do not need to do more complex analysis. To do this, we clicked on the blue highlighted trial_expire_date (Figure eight) and went to the static global class global to browse its associated code, and we found the following key code:
Language code IL assembly. Method private Hidebysig specialname rtspecialname static void. Ccto R () CIL managed
{
Code size:18 Byte (s)
. maxstack 4
L_0000:ldsflda [Mscorlib]system.datetime ninerays.web.ui.webcontrols.flytreeview.global::trial_expire_date
L_0005:LDC.I4 2004
l_000a:ldc.i4.8
l_000b:ldc.i4.3
L_000c:call instance void [Mscorlib]system.datetime::.ctor (Int32, Int32, Int32)
L_0011:ret
} c#static Global ()
{
Global.trial_expire_date = new DateTime (0X7D4, 8, 3);
}vb.netprivate Shared Sub New ()
Global.trial_expire_date = New DateTime (2004, 8, 3)
End Sub Delphiconstructor global.create;
Begin
Global.trial_expire_date. Create (2004, 8, 3)
End See the corresponding screenshot (Figure Nine):
In the above compiled by reflector code, the VB.net and Delphi code is most intuitive, it gives us a glimpse of the control's last use period of August 3, 2004. (Different time download or installation of Flytreeview performance in the code due date may be different, the author did not deliberately textual research)
The next step is to get into the actual cracked.
3, Control crack:
In the working directory, double-click the disassembly batch file Myildasm.bat, the working directory appears in the disassembly of the NineRays.Web.UI.WebControls.FlyTreeView.il and other related documents, see the following table:
NineRays.Web.UI.WebControls.FlyTreeView.il
NineRays.Web.UI.WebControls.FlyTreeView.Resources.Previews.Iconless.gif
NineRays.Web.UI.WebControls.FlyTreeView.FlyNodeSet.resources
NineRays.Web.UI.WebControls.FlyTreeView.FlyContextMenu.bmp
NineRays.Web.UI.WebControls.FlyTreeView.Resources.Previews.Default.gif
NineRays.Web.UI.WebControls.FlyTreeView.Design.AutoFormatForm.resources
NineRays.Web.UI.WebControls.FlyTreeView.Resources.Previews.MSDN.gif
NineRays.Web.UI.WebControls.FlyTreeView.Resources.Previews.Night.gif
NineRays.Web.UI.WebControls.FlyTreeView.FlyTreeView.bmp
NineRays.Web.UI.WebControls.FlyTreeView.Design.PreNodeTypesButton.resources
Ninerays.web.ui.webcontrols.flytreeview.resources.previews.office-2003.gif
NineRays.Web.UI.WebControls.FlyTreeView.RelItem.resources
NineRays.Web.UI.WebControls.FlyTreeView.Resources.FlyTreeView.ico
Ninerays.web.ui.webcontrols.flytreeview.resources.previews.windows-xp-explorer.gif
NineRays.Web.UI.WebControls.FlyTreeView.FlyNodeSet.bmp
Ninerays.web.ui.webcontrols.flytreeview.resources.previews.classic-explorer.gif
NineRays.Web.UI.WebControls.FlyTreeView.res
Open the NineRays.Web.UI.WebControls.FlyTreeView.il with Notepad and flip one to two pages to see the following code, which is the public key for the control signature, and should be deleted to avoid being kicked out by the GAC and not added to the toolbox.
. PublicKey = (00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00//. $ ...)
00 24 00 00 52 53 41 31 00 04 00 00 01 00-01 00//. $ RSA1 .....
CD EB B7 1 a 4 b 1C F2 FA//. W...... Ksy.g..
7E AE 6A D6 0F D6 3C DC 6C B2 1D//~. J.. Cw<.l2.. H.
B9 1 A 9E E9 B2 6A D9 2F-E8//...%.j. /.2...d
E8 2E A2 6C BB DC 5A C5 B9 23 72 96//...) L.. Z1.. F. #r.
5 b D7 3F 0C 0A 2A F3 0E 9D 5B//[.?.. *..... (1.[c
EE 7A 7A F4 2E 8D (MB) FF ZZC//... G6yg.. 2
8B FA F4 AF 7C 3D 0B B1 D0 2D C2 7C//... =. u...-.|
C1 FC 8E AF (9C 4E 4F C6 0A A2 AA)//.) 0a...r.no ...//should be deleted
Use the lookup function in Notepad to find "0x7d4" (2004), combining the relevant clues from the previous reflector disassembly, you can determine the corresponding global () in NineRays.Web.UI.WebControls.FlyTreeView.il The IL assembly code for the constructor is as follows:. Method private Hidebysig specialname rtspecialname static
void. cctor () CIL managed
{
Code size (0x12)
. maxstack 4
Il_0000:ldsflda ValueType [Mscorlib]system.datetime ninerays.web.ui.webcontrols.flytreeview.global::trial_expire_ DATE
IL_0005:ldc.i4 0x7d4
il_000a:ldc.i4.8
il_000b:ldc.i4.3
Il_000c:call instance void [Mscorlib]system.datetime::.ctor (Int32,
Int32,
Int32)
Il_0011:ret
The 0X7D4 in the above code is changed to the year we need to be able to achieve the purpose of the global::.cctor. Note that the new year value should not be too large, or may exceed the upper limit of the operating system support, it may appear "million years of Worms." The value of 2050 years is enough, because people can not still use this version of Flytreeview in more than 40 years, and then, if Microsoft is lucky to exist, I am afraid that even dotnet have been eliminated. 2050 the corresponding hexadecimal representation is 0x802, and the NineRays.Web.UI.WebControls.FlyTreeView.il is saved after modification.
The next step is to compile the cracked code using the Assembler tool ilasm.
Before compiling, we also digitally sign the control. (Strong name is not required, you can not do it, but if you do not want to do, please delete the/key:treekey.snk directive in Myilasm.bat)
To make a digital signature, you first use the SN. EXE to generate the signature key. In Explorer, right-click the folder icon in the working directory "Flytreeview cracked" and select "Go to command line" in the pop-up menu, and then type Sn-k treekey.snk carriage return in the DOS window. A new "random key pair" is stored in the Treekey.snk file in the working directory.
The next step is to get into the actual compilation process. Turn off the DOS windows and reflector software, back to the resource manager, Delete the NineRays.Web.UI.WebControls.FlyTreeView.dll in the working directory, and then double-click the batch file in the working directory Myilasm.bat, and so on, when the compilation ends, You can see that a new NineRays.Web.UI.WebControls.FlyTreeView.dll appears in the working directory.
At this point, if the previous work has not been wrong, the Flytreeview control of the crack work is over. Four, after the crack test
Start Visual Studio. NET 2003, open the sample project Samples.csproj in the Samples directory of the Flytreeview sample site, delete the project's reference to NineRays.Web.UI.WebControls.FlyTreeView in Solution Explorer, and the NIN The ERays.Web.UI.WebControls.FlyTreeView reference is added and added to the toolbox in a way.
After you regenerate the samples project and then adjust the system date backwards for several years and browse the sample site in the browser, you will find that you no longer throw exceptions.
For the final confirmation of the success of the crack, another machine to use the IP address or domain name way to access the sample site, all normal.
At this point, Flytreeview for ASP.net 3.2 of the cracking work, if you are interested, you can also be a cracked control to do a Setup deployment project. This is not the scope of this article to explore.
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.