Analysis of license verification principles in URTracker 2.11

Source: Internet
Author: User
Tags reflector

Note: original, reprinted please indicate the source.
Prepared by: caicao
First: http://kokey.blogchina.com

Preface:

After reading henryouly's article, I was deeply inspired and decided to analyze the latest version of URTracker. Thank you for choosing henryouly!

××××××××××××××××××××××××××××××××××××××××××× ×××××
The URTracker Transaction Tracking System is a powerful and easy-to-use Web-based collaborative work software. It is used to help companies and teams track issues at work, manage and record the handling processes of these issues.
URTracker provides your team with a full-featured, highly customizable software tool for reporting and tracking issues, requirements, bugs, or tasks. It has rich custom fields, permission Control Based on projects and roles, simplified workflows, friendly user interfaces, and more features. We are very confident that you will like URTracker, because we believe that she is what you need.
××××××××××××××××××××××××××××××××××××××××××× ××××
Tool introduction:

To study. NET, Reflector for. NET is required. (Reflector is a class browser. NET components. it supports assembly and namespace views, type and member search, XML documentation, call and callee graphs, IL, Visual Basic, Delphi and C # decompiler, dependency trees, base type and derived type hierarchies and resource viewers .)
If you want to save the code, you need the Reflector plug-in Reflector. FileDisassembler. (The Reflector. fileDisassembler is a little add-in for the new version of Lutz Roeders. NET Reflector that you can use to dump the decompiler output to files of any Reflector suppsupported language (C #, VB. NET, Delphi ). this is extremely useful if you are searching for a specific line of code as you can use. NETs "Find in Files" or want to convert a class from one language to another.
)
: Reflector for. NET http://www.aisto.com/roeder/dotnet/
Reflector. filedisw.er aspx "> http://www.denisbauer.com/NETTools/FileDisassembler.aspx

Body:

Serious statement: This article is for scientific research and learning purposes only. All legal disputes arising from this article are irrelevant to me.

Now that we know Reflector, we can start to study URTracker.

Of course, first use Reflector to analyze the files in the bin folder. There are 12 DLL files in total. You can also guess the names of these DLL files, you can try again with Reflector if you're not afraid of trouble... pai_^
Finally, we found WebTracker. dll suspicious, because when Reflector presses F3, you can find a lot of license stuff. Haha, the road to inquiry has begun.
First, let's take a look at the ServerLicenseProvider class under Lealsoft. URTracker. BLL.

Public class ServerLicenseProvider: LicenseProvider
{
// Methods
Static ServerLicenseProvider ();
Public ServerLicenseProvider ();
Protected virtual ServerLicense CreateEmptyLicense (Type type );
Protected virtual ServerLicense CreateLicense (Type type, string key );
Public override License GetLicense (LicenseContext context, Type type, object instance, bool allowExceptions );
Protected virtual string GetLicenseData (Type type );
Protected virtual Stream GetLicenseDataStream (Type type );
Protected virtual bool ValidateLicense (ServerLicense license, out string errorMessage );
Protected virtual bool ValidateLicenseData (Type type, string licenseData );

// Fields
Private static readonly ServerLicenseCollector LicenseCollector;

// Nested Types
Private sealed class ServerLicenseCollector
{
// Methods
Public ServerLicenseCollector ();
Public void AddLicense (Type objectType, ServerLicense license );
Public ServerLicense GetLicense (Type objectType );
Public void RemoveLicense (Type objectType );

// Fields
Private IDictionary _ collectedLicenses;
}
}
 
No. There are several CreateLicense, GetLicense, ValidateLicense, ValidateLicenseData, and GetLicenseDataStream methods. Okay. Open it and see what it is.

Protected virtual ServerLicense CreateLicense (Type type, string key)
{
Char [] chArray1 = new char [1] {:};
String [] textArray1 = key. Split (chArray1 );
Return new URTrackerLicense (type, key, long. parse (textArray1 [1], CultureInfo. invariantCulture), long. parse (textArray1 [2], CultureInfo. invariantCulture), textArray1 [3], long. parse (textArray1 [4], CultureInfo. invariantCulture), long. parse (textArray1 [5], CultureInfo. invariantCulture), textArray1 [6]);
}
 
Wow! It is to create a new license. URTrackerLicense has several parameters after it. It cannot be seen anything. It feels like ":" is used to split a string. Open the URTrackerLicense constructor.
Public URTrackerLicense (Type type, string key, long startTicks, long ticks, string username, long userIndex, long clientCount, string mac): base (type, key)
{
This. _ foundMac = false;
This. _ ticks = ticks;
This. _ startTicks = startTicks;
This. _ username = username;
This. _ userIndex = userIndex;
This. _ clientCount = clientCount;
This. _ mac = mac;
This. _ macArray = URTrackerLicense. GetMacArray ();
This. _ foundMac = this. _ macArray. IndexOf (this. _ mac)>-1;
}
 
Oh, see ticks, startTicks, username, userIndex, clientCount, mac
Are these required parameters "expiration time, start time, username, username index, number of users, local NIC address"
A little interesting. Haha.
After finding the URTrackerLicense class, you will know that we have not guessed it.
Public class URTrackerLicense: ServerLicense
{
// Methods
Public URTrackerLicense (Type type, string key, long startTicks, long ticks, string username, long userIndex, long clientCount, string mac );
Public static ArrayList GetMacArray ();

// Properties
Public long ClientCount {get ;}
Public bool IsExpired {get ;}
Public string Mac {get ;}
Public long StartTicks {get ;}
Public long Ticks {get ;}
Public long UserIndex {get ;}
Public string Username {get ;}

// Fields
Private long _ clientCount;
Private bool _ foundMac;
Private string _ mac;
Private ArrayList _ macArray;
Private long _ startTicks;
Private long _ ticks;
& Nb

Related Article

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.