Reverse Engineering Team Board

Reverse Engineering Team Board (
-   .NET Reverse Engineering (
-   -   Dotnet program license check (

kesk 11-17-2015 08:23 AM

Dotnet program license check

Public Shared Function IsLicensed() As Boolean
        Dim license As License = LicenseManager.Validate(GetType(Verify_License), New Verify_License)
        If (license Is Nothing) Then
            Return False
        End If
        If (license.LicenseKey.CompareTo(GetType(Verify_License).GUID.ToString) <> 0) Then
            Return False
        End If
        Dim license2 As BaseLicense = TryCast(license,BaseLicense)
        Dim strArray As String() = license2.OwnerKey.Split(New Char() { "|"c })
        Dim i As Integer
        For i = 0 To strArray.Length - 1
            New Guid(strArray(i))
        Next i
        Return True
    Catch obj1 As Object
        Return False
    End Try
End Function

I understand from the above code that, when this function is called, it verifies the license info, and returns 1 if True or 0 if False.

So edited the code to return 1. This code is inside a dll. When this dll is called in the main program, to verify license, it should run. However, the program fails to run and there is no warning.

Further look into the evenlog directed that .Net security could be the reason and disabled the security in the application config file.

But still the program wont run. This license verification is done only in the main program and in the Main () event.

What am I missing here.

Any reply will be appreciated.

All times are GMT -4. The time now is 04:16 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.