The Enigma Protector

Sujets variés concernant le développement en PureBasic
CaptainCrunch
Messages : 52
Inscription : dim. 29/juin/2014 6:32

The Enigma Protector

Message par CaptainCrunch »

Alternative à ASProtect, armadillo...

Fonctionne parfaitement avec PureBasic

X86 - X64

http://enigmaprotector.com/
CaptainCrunch
Messages : 52
Inscription : dim. 29/juin/2014 6:32

Re: The Enigma Protector

Message par CaptainCrunch »

Après installation...

2 Régles :

1 : Les Apis d'enigma ne fonctionnent qu'après protection de l'éxécutable.
2 : Pour la création de Keygen, vérifier la présence de "Keygen.dll" (dispo dans le sdk) dans le repertoire de vôtre éxécutable.


Let's go...

Portage des constantes, structures pour Keygen.dll

Code : Tout sélectionner


; EnigmaKeygenConst.pb

;' Key generation/verification results

Enumeration
  #EP_NO_ERROR                      = 0
  #EP_ERROR_UNKNOWN                 = 1
  #EP_ERROR_KEYBUFFEREMPTY          = 2
  #EP_ERROR_KEYBUFFERISLESS         = 3
  #EP_ERROR_REGINFOEMPTY            = 4
  #EP_ERROR_REGINFOTOOLARGE         = 5
  #EP_ERROR_PRIVATEKEYISNOTSET      = 6
  #EP_ERROR_PUBLICKEYISNOTSET       = 7
  #EP_ERROR_PRIVATEKEYISINVALID     = 8
  #EP_ERROR_PUBLICKEYISINVALID      = 9
  #EP_ERROR_KEYMODEISINVALID        = 10
  #EP_ERROR_KEYBASEISINVALID        = 11
  #EP_ERROR_CURRENTDATEISINVALID    = 12
  #EP_ERROR_EXPIRATIONDATEISINVALID = 13
  #EP_ERROR_KEYISINVALID            = 14
  #EP_ERROR_HARDWAREID              = 15
  #EP_ERROR_HARDWAREBUFFEREMPTY     = 16
  #EP_ERROR_HARDWAREIDINVALIDFORKEY = 17
  #EP_ERROR_PROJECTFILENOTFOUND     = 18
  #EP_ERROR_INVALIDPROJECTFILE      = 19
  #EP_ERROR_EXECUTIONSNUMBERINVALID = 20
  #EP_ERROR_DAYSNUMBERINVALID       = 21
  #EP_ERROR_COUNTRYCODEINVALID      = 22
  #EP_ERROR_RUNTIMEINVALID          = 23
  #EP_ERROR_GLOBALTIMEINVALID       = 24
  #EP_ERROR_INSTALLBEFOREINVALID    = 25
  #EP_ERROR_INSTALLAFTERINVALID     = 26

  ;Number of crypted sections
  
  #NUMBER_OF_CRYPTED_SECTIONS = 16

; Registartion mode types
  #RM_512  = 0
  #RM_768  = 1
  #RM_1024 = 2
  #RM_2048 = 3
  #RM_3072 = 4
  #RM_4096 = 5

; Registration Base types
  #RB_2  = 0
  #RB_8  = 1
  #RB_16 = 2
  #RB_32 = 3
  #RB_64 = 4

; Counties code
  #CN_AFGHANISTAN      = 114
  #CN_ALBANIA          = 1
  #CN_ALGERIA          = 2
  #CN_ARGENTINA        = 3
  #CN_ARMENIA          = 4
  #CN_AUSTRALIA        = 5
  #CN_AUSTRIA          = 6
  #CN_AZERBAIJAN       = 7
  #CN_BAHRAIN          = 8
  #CN_BANGLADESH       = 115
  #CN_BELARUS          = 9
  #CN_BELGIUM          = 10
  #CN_BELIZE           = 11
  #CN_BOLIVIA          = 116
  #CN_BOSNIA           = 117
  #CN_BRAZIL           = 13
  #CN_BRUNEI           = 14
  #CN_BULGARIA         = 15
  #CN_CAMBODIA         = 16
  #CN_CANADA           = 17
  #CN_CARRIBEAN        = 118
  #CN_CHILE            = 20
  #CN_CHINA            = 21
  #CN_COLOMBIA         = 22
  #CN_COSTARICA        = 23
  #CN_CROATIA          = 24
  #CN_CZECH            = 25
  #CN_DENMARK          = 26
  #CN_DOMINICAN        = 27
  #CN_ECUADOR          = 28
  #CN_EGYPT            = 29
  #CN_ELSALVADOR       = 30
  #CN_ESTONIA          = 31
  #CN_ETHIOPIA         = 119
  #CN_FAROE            = 32
  #CN_FINLAND          = 33
  #CN_FRANCE           = 34
  #CN_GEORGIA          = 35
  #CN_GERMANY          = 36
  #CN_GREECE           = 37
  #CN_GREENLAND        = 120
  #CN_GUATEMALA        = 38
  #CN_HONDURAS         = 39
  #CN_HONGKONG         = 40
  #CN_HUNGARU          = 41
  #CN_ICELAND          = 42
  #CN_INDIA            = 43
  #CN_INDONESIA        = 44
  #CN_IRAN             = 45
  #CN_IRAQ             = 46
  #CN_IRELAND          = 47
  #CN_ISRAEL           = 48
  #CN_ITALY            = 49
  #CN_JAMAICA          = 50
  #CN_JAPAN            = 51
  #CN_JORDAN           = 52
  #CN_KAZAKHSTAN       = 53
  #CN_KENYA            = 54
  #CN_KOREA            = 56
  #CN_KUWAIT           = 57
  #CN_KYRGYZSTAN       = 58
  #CN_LAOS             = 121
  #CN_LATVIA           = 59
  #CN_LEBANON          = 60
  #CN_LIBYAN           = 122
  #CN_LIECHTENSTEIN    = 62
  #CN_LITHUANIA        = 63
  #CN_LUXEMBOURG       = 64
  #CN_MACAO            = 65
  #CN_MACEDONIA        = 66
  #CN_MALAYSIA         = 67
  #CN_MALDIVES         = 123
  #CN_MALTA            = 124
  #CN_MEXOCI           = 68
  #CN_MONACO           = 70
  #CN_MONGOLIA         = 71
  #CN_MONTENEGRO       = 125
  #CN_MOROCCO          = 72
  #CN_NEPAL            = 126
  #CN_NETHERLANDS      = 73
  #CN_NEWZEALAND       = 74
  #CN_NICARAGUA        = 75
  #CN_NIGERIA          = 127
  #CN_NORWAY           = 76
  #CN_OMAN             = 77
  #CN_PAKISTAN         = 78
  #CN_PANAMA           = 79
  #CN_PARAGUAY         = 80
  #CN_PERY             = 81
  #CN_PHILIPPINES      = 82
  #CN_POLAND           = 83
  #CN_PORTUGAL         = 84
  #CN_PUERTORICO       = 85
  #CN_QATAR            = 86
  #CN_ROMANIA          = 87
  #CN_RUSSIA           = 88
  #CN_RWANDA           = 128
  #CN_SAUDIARABIA      = 89
  #CN_SENEGAL          = 129
  #CN_SERBIA           = 130
  #CN_SERBIAMONTENEGRO = 90
  #CN_SINGAROPE        = 91
  #CN_SLOVAKIA         = 92
  #CN_SLOVENIA         = 93
  #CN_SOUTHAFRICA      = 94
  #CN_SPAIN            = 95
  #CN_SRILANKA         = 131
  #CN_SWEDEN           = 96
  #CN_SWITZERLAND      = 97
  #CN_SYRIAN           = 132
  #CN_TAIWAN           = 98
  #CN_TAJIKISTAN       = 99
  #CN_THAILAND         = 100
  #CN_TRINIDADTOBAGO   = 101
  #CN_TUNISIA          = 102
  #CN_TURKEY           = 103
  #CN_TURKMENISTAN     = 133
  #CN_UKRAINE          = 104
  #CN_UAE              = 105
  #CN_UNITEDKINGDOM    = 106
  #CN_USA              = 107
  #CN_URUGUAY          = 108
  #CN_UZBEKISTAN       = 109
  #CN_VENEZUELA        = 110
  #CN_VIETNAM          = 111
  #CN_YEMEN            = 112
  #CN_ZIMBABWE         = 113

EndEnumeration

Structure TKeyGenParams
  KeyMode.l             ;{in} key generation mode (~RSA ???)
  KeyBase.l             ;{n} key output base (Base ???)
  KeyWithHyphens.i      ;{in} add hyphens to the key?
  Key.s                 ;{in} buffer for registration key
  KeyLen.l              ;{in} registration key size
  RegInfo.s             ;{in} registration info/name
  RegInfoLen.l          ;{in} registration info/name size
  UseKeyExpiration.i    ;{in} use key expiration?
  ExpirationYear.l      ;{in} key expiration year
  ExpirationMonth.l     ;{in} key expiration month
  ExpirationDay.l       ;{in} key expiration day
  UseHardwareLocking.i  ;{in} is key hardware locked?
  HardwareID.s          ;{in} pointer to null terminated hardware string
  UseExecutionsLimit.i  ;{in} limit key by executions?
  ExecutionsCount.l     ;{in} number of executions
  UseDaysLimit.i        ;{in} limit key by days?
  DaysCount.l           ;{in} number of days
  UseRunTimeLimit.i     ;{in} limit key by run time?
  RunTimeMinutes.l      ;{in} run time minutes
  UseGlobalTimeLimit.i  ;{in} limit key by global time?
  GlobalTimeMinutes.l   ;{in} global time minutes
  UseCountyLimit.i      ;{in} limit key by country?
  CountryCode.l         ;{in} country code
  UseRegisterAfter.i    ;{in} register key after date?
  RegisterAfterYear.l   ;{in} register after year
  RegisterAfterMonth.l  ;{in} register after month
  RegisterAfterDay.l    ;{in} register after day
  UseRegisterBefore.i   ;{in} register key before date?
  RegisterBeforeYear.l  ;{in} register before year
  RegisterBeforeMonth.l ;{in} register before month
  RegisterBeforeDay.l   ;{in} register before day
  EncryptedConstant.q   ;{in} Encryption Constant - should be extracted from project file
  
  EncryptedSections.b[#NUMBER_OF_CRYPTED_SECTIONS - 1] ;{in} Crypted sections
  
  PrivateKey.s          ;{in} Private Key - should be extracted from project file
  PublicKey.s           ;{in} Public Key - should be extracted from project file
EndStructure

Structure TKeyVerifyParams
  RegInfo.s             ;{in} registration info/name
  RegInfoLen.l          ;{in} registration info/name size
  KeyMode.l             ;{in} key generation mode (~RSA ???)
  KeyBase.l             ;{in} key output base (Base ???)
  Key.s                 ;{in} buffer for registration key
  KeyLen.l              ;{in} registration key size
  CreationYear.l        ;{out} key creation year
  CreationMonth.l       ;{out} key creation month
  CreationDay.l         ;{out} key creation day
  UseKeyExpiration.i    ;{out} has key expiration date?
  ExpirationYear.l      ;{out} key expiration year
  ExpirationMonth.l     ;{out} key expiration month
  ExpirationDay.l       ;{out} key expiration day
  UseHardwareLocking.i  ;{in} hardware locked key
  HardwareID.s          ;{in} pointer to null terminated hardware string
  
  UseExecutionsLimit.i  ;{out} limit key by executions?
  ExecutionsCount.l     ;{out} number of executions
  UseDaysLimit.i        ;{out} limit key by days?
  DaysCount.l           ;{out} number of days
  UseRunTimeLimit.i     ;{out} limit key by run time?
  RunTimeMinutes.l      ;{out} run time minutes
  UseGlobalTimeLimit.i  ;{out} limit key by global time?
  GlobalTimeMinutes.l   ;{out} global time minutes
  UseCountyLimit.i      ;{out} limit key by country?
  CountryCode.l         ;{out} country code
  UseRegisterAfter.i    ;{out} register key after date?
  RegisterAfterYear.l   ;{out} register after year
  RegisterAfterMonth.l  ;{out} register after month
  RegisterAfterDay.l    ;{out} register after day
  UseRegisterBefore.i   ;{out} register key before date?
  RegisterBeforeYear.l  ;{out} register before year
  RegisterBeforeMonth.l ;{out} register before month
  RegisterBeforeDay.l   ;{out} register before day
  EncryptedConstant.l   ;{in} Encryption Constant - should be extracted from project file
  
  EncryptedSections.b[#NUMBER_OF_CRYPTED_SECTIONS - 1] ;{out} Crypted sections
  
  PublicKey.s           ;{in} Public Key - should be extracted from project file
EndStructure

;*****************************************************


Procedure.s ErrorShow(dwResult.l)
Protected Ret.s
  
Select dwResult
       
  Case #EP_NO_ERROR                      : Ret = "EP_NO_ERROR "       
  Case #EP_ERROR_UNKNOWN                 : Ret = "EP_ERROR_UNKNOWN"
  Case #EP_ERROR_KEYBUFFEREMPTY          : Ret = "EP_ERROR_KEYBUFFEREMPTY"
  Case #EP_ERROR_KEYBUFFERISLESS         : Ret = "EP_ERROR_KEYBUFFERISLESS"
  Case #EP_ERROR_REGINFOEMPTY            : Ret = "EP_ERROR_REGINFOEMPTY"
  Case #EP_ERROR_REGINFOTOOLARGE         : Ret = "EP_ERROR_REGINFOTOOLARGE"
  Case #EP_ERROR_PRIVATEKEYISNOTSET      : Ret = "EP_ERROR_PRIVATEKEYISNOTSET"
  Case #EP_ERROR_PUBLICKEYISNOTSET       : Ret = "EP_ERROR_PUBLICKEYISNOTSET"
  Case #EP_ERROR_PRIVATEKEYISINVALID     : Ret = "EP_ERROR_PRIVATEKEYISINVALID"
  Case #EP_ERROR_PUBLICKEYISINVALID      : Ret = "EP_ERROR_PUBLICKEYISINVALID"
  Case #EP_ERROR_KEYMODEISINVALID        : Ret = "EP_ERROR_KEYMODEISINVALID"
  Case #EP_ERROR_KEYBASEISINVALID        : Ret = "EP_ERROR_KEYBASEISINVALID"
  Case #EP_ERROR_CURRENTDATEISINVALID    : Ret = "EP_ERROR_CURRENTDATEISINVALID"
  Case #EP_ERROR_EXPIRATIONDATEISINVALID : Ret = "EP_ERROR_EXPIRATIONDATEISINVALID"
  Case #EP_ERROR_KEYISINVALID            : Ret = "EP_ERROR_KEYISINVALID"
  Case #EP_ERROR_HARDWAREID              : Ret = "EP_ERROR_HARDWAREID"
  Case #EP_ERROR_HARDWAREBUFFEREMPTY     : Ret = "EP_ERROR_HARDWAREBUFFEREMPTY"
  Case #EP_ERROR_HARDWAREIDINVALIDFORKEY : Ret = "EP_ERROR_HARDWAREIDINVALIDFORKEY"
  Case #EP_ERROR_PROJECTFILENOTFOUND     : Ret = "EP_ERROR_PROJECTFILENOTFOUND"
  Case #EP_ERROR_INVALIDPROJECTFILE      : Ret = "EP_ERROR_INVALIDPROJECTFILE"
  Case #EP_ERROR_EXECUTIONSNUMBERINVALID : Ret = "EP_ERROR_EXECUTIONSNUMBERINVALID"
  Case #EP_ERROR_DAYSNUMBERINVALID       : Ret = "EP_ERROR_DAYSNUMBERINVALID"
  Case #EP_ERROR_COUNTRYCODEINVALID      : Ret = "EP_ERROR_COUNTRYCODEINVALID"
  Case #EP_ERROR_RUNTIMEINVALID          : Ret = "EP_ERROR_RUNTIMEINVALID"
  Case #EP_ERROR_GLOBALTIMEINVALID       : Ret = "EP_ERROR_GLOBALTIMEINVALID"
  Case #EP_ERROR_INSTALLBEFOREINVALID    : Ret = "EP_ERROR_INSTALLBEFOREINVALID"
  Case #EP_ERROR_INSTALLAFTERINVALID     : Ret = "EP_ERROR_INSTALLAFTERINVALID"
  Default:Ret = "Unknown error"

EndSelect
    
ProcedureReturn Ret
    
EndProcedure



Et un exemple...

Code : Tout sélectionner


; Exemple Keygen - CaptainCrunch

IncludeFile "EnigmaKeygenConst.pb"

Global Lib_Name.s = "keygen.dll"
Global Lib_Num.l, dwResult.l

Global kg.TKeyGenParams
Global kv.TKeyVerifyParams

Prototype.l apiKG_GenerateRegistrationKey(kg)
Prototype.l apiKG_GenerateRegistrationKeyFromProject(ProjectName.s,kg)

Prototype.l apiKG_VerifyRegistrationInfo(kv)
Prototype.l apiKG_VerifyRegistrationInfoFromProject(ProjectName.s,kv)

Enumeration
  #mainfrm      = 1
  #edtId        = 2
  #edtPath      = 3
  #edtName      = 4
  #edtSerial    = 5
  #btnParcourir = 6
  #btnGenerer   = 7
  #btnAnnuler   = 8
  #btnCopier    = 9
  #txtId        = 10
  #txtPath      = 11
  #txtName      = 12
  #txtSerial    = 13
EndEnumeration

;**************************************

Procedure.s SelectionProjet()
  
Protected FichierParDefaut.s, FiltreStr.s,Fichier.s
Protected Filtre.i
  
FichierParDefaut = "C:\"
FiltreStr        = "Projet Enigma (*.enigma)|*.enigma"
Filtre           = 0 
Fichier          = OpenFileRequester("Choisissez votre projet Enigma", FichierParDefaut, FiltreStr,Filtre)

If Fichier
    ProcedureReturn fichier
  Else
    ProcedureReturn ""
EndIf 
  
EndProcedure

;********************************************

Procedure Gen()
  
Protected EnigmaProjectFile.s
  
EnigmaProjectFile = GetGadgetText(#edtPath)

Lib_Num  = OpenLibrary(#PB_Any,Lib_Name)

If Lib_Num > 0
     
    KG_GenerateRegistrationKeyFromProject.apiKG_GenerateRegistrationKeyFromProject = GetFunction(Lib_Num,"KG_GenerateRegistrationKeyFromProject")
    
    With kg
        \Key        = Space(4096) ; A changer en fonction de la taille de la clef
        \KeyLen     = 4096          ; A changer en fonction de la taille de la clef
        \RegInfo    = GetGadgetText(#edtName)
        \RegInfoLen = Len(\RegInfo)
        \HardwareID = GetGadgetText(#edtId)
     
      
    dwResult = KG_GenerateRegistrationKeyFromProject(EnigmaProjectFile,kg)
        
            Select dwResult
                
            Case 0
              SetGadgetText(#edtSerial,\Key)
            
            Default
              MessageRequester("Erreur",ErrorShow(dwResult),#PB_MessageRequester_Ok)
                        
            EndSelect
    EndWith
      
    CloseLibrary(Lib_Num)
  
EndIf
  
EndProcedure

;******************************************

Procedure.i Check()
Protected tmpPath.s, tmpId.s, tmpName.s

tmpPath = GetGadgetText(#edtPath)
tmpId   = GetGadgetText(#edtId)
tmpName = GetGadgetText(#edtName)  

If Len(tmpPath) <> 0
    If Len(tmpId) <> 0
        If Len(tmpName) <> 0
            ProcedureReturn 7
          Else
            MessageRequester("","Veuillez saisir le nom SVP.",#PB_MessageRequester_Ok)
            EndIf
        Else
        MessageRequester("","Veuillez saisir l'identifiant machine SVP.",#PB_MessageRequester_Ok)
    EndIf
  Else
    MessageRequester("","Veuillez choisir un projet Enigma SVP.",#PB_MessageRequester_Ok)
EndIf

ProcedureReturn 0

EndProcedure

;*********************************************

Procedure mainKeygenOpen()
  
  OpenWindow(#mainfrm, 0, 0, 380, 190, "PureBasic - Enigma Keygen", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered | #PB_Window_WindowCentered)
  StringGadget(#edtId, 10, 80, 120, 20, "") ; Exemple -> 4DDE52-08ABAB
  StringGadget(#edtPath, 10, 30, 330, 20, "")
  StringGadget(#edtName, 140, 80, 230, 20, "")
  StringGadget(#edtSerial, 10, 160, 360, 20,"")
  ButtonGadget(#btnParcourir, 350, 30, 20, 20, "P")
  ButtonGadget(#btnGenerer, 220, 110, 70, 30, "Générer")
  ButtonGadget(#btnAnnuler, 300, 110, 70, 30, "Annuler")
  ButtonGadget(#btnCopier, 140, 110, 70, 30, "Copier")
  TextGadget(#txtId, 10, 60, 120, 20, "Machine Id :")
  TextGadget(#txtPath, 10, 10, 330, 20, "Projet Enigma : (ex : c:\projet.enigma)")
  TextGadget(#txtName, 140, 60, 180, 20, "Licence accordée à :")
  TextGadget(#txtSerial, 10, 140, 360, 20, "Numéro de série :")
  
EndProcedure

;***************************************************

Procedure.l mainKeygenEvent()
  
Protected glEvent.l, glGadget.l, glType.l, glWindow.l
Protected tmpSerial.s, RetCheck.l
Protected tmpPath.s
Repeat

glEvent  = WaitWindowEvent()
glGadget = EventGadget()
glType   = EventType()
glWindow = EventWindow() 

If  glwindow = #mainfrm
    If glEvent = #PB_Event_Gadget
      
        Select glGadget
            
              Case #btnParcourir
                
                  tmpPath = SelectionProjet()
                  
                  If tmpPath <> ""
                    SetGadgetText(#edtPath,tmpPath)
                  EndIf
              
              Case #btnGenerer
                
                  RetCheck = Check()
                  
                  If RetCheck = 7
                    Gen()
                  EndIf
               
              Case #btnAnnuler
                 End
                
              Case #btnCopier
                  tmpSerial = GetGadgetText(#edtSerial)
                  
                  If Len(tmpSerial) > 30
                    SetClipboardText(tmpSerial) 
                    MessageRequester("","Numéro de série copié dans le presse papier",#PB_MessageRequester_Ok)
                  EndIf
            
        EndSelect
    
    EndIf
EndIf


Until glEvent = #PB_Event_CloseWindow
End
EndProcedure

;*****************************

mainKeygenOpen()
mainKeygenEvent()

Capture d'écran :

http://hpics.li/f71fd0b
Dernière modification par CaptainCrunch le ven. 11/juil./2014 12:46, modifié 2 fois.
CaptainCrunch
Messages : 52
Inscription : dim. 29/juin/2014 6:32

Re: The Enigma Protector

Message par CaptainCrunch »

Les marqueurs...

Code : Tout sélectionner


;EnigmaMarkers.pb

;{ CHECK_PROTECTION

Macro CHECK_PROTECTION_BEGIN
  !DB $EB, $08, $43, $48, $43, $4B, $50, $52, $54, $42
EndMacro

Macro CHECK_PROTECTION_END
  !DB $EB, $08, $43, $48, $43, $4B, $50, $52, $54, $45
EndMacro

;}

;{ VM

Macro VM_RISC_BEGIN ; Pas dans la démo
  !DB $EB, $08, $56, $4D, $42, $45, $47, $49, $4E, $31
EndMacro

Macro VM_RISC_END   ; Pas dans la démo 
  !DB $EB, $08, $56, $4D, $45, $4E, $44, $31, $00, $00
EndMacro

Macro VM_BEGIN
  !DB $EB, $08, $56, $4D, $42, $45, $47, $49, $4E, $00
EndMacro

Macro VM_END
  !DB $EB, $08, $56, $4D, $45, $4E, $44, $00, $00, $00
EndMacro

;}

;{ DECRYPT_ON_EXECUTE

Macro DECRYPT_ON_EXECUTE_BEGIN
  !DB $EB, $0C, $45, $43, $52, $4F, $4E, $45, $58, $45, $43, $42, $00, $00 
EndMacro

Macro DECRYPT_ON_EXECUTE_END
  !DB $EB, $0C, $45, $43, $52, $4F, $4E, $45, $58, $45, $43, $45, $00, $00
EndMacro

;}

;{ RUN_ONCE

Macro RUN_ONCE_BEGIN
  !DB $EB, $08, $72, $75, $6E, $6F, $6E, $63, $65, $42
EndMacro

Macro RUN_ONCE_END
  !DB $EB, $08, $72, $75, $6E, $6F, $6E, $63, $65, $45
EndMacro

;}

;{ UNPROTECTED

Macro UNPROTECTED_BEGIN
  !DB $EB, $08, $55, $4E, $50, $52, $4F, $54, $42, $00 
EndMacro

Macro UNPROTECTED_END
  !DB $EB, $08, $55, $4E, $50, $52, $4F, $54, $45, $00
EndMacro

;}

;{ REG_CRYPT 1..16

Macro REG_CRYPT_BEGIN1
  !DB $EB, $08, $52, $47, $43, $52, $42, $01, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN2
  !DB $EB, $08, $52, $47, $43, $52, $42, $02, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN3
  !DB $EB, $08, $52, $47, $43, $52, $42, $03, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN4
  !DB $EB, $08, $52, $47, $43, $52, $42, $04, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN5
  !DB $EB, $08, $52, $47, $43, $52, $42, $05, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN6
  !DB $EB, $08, $52, $47, $43, $52, $42, $06, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN7
  !DB $EB, $08, $52, $47, $43, $52, $42, $07, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN8
  !DB $EB, $08, $52, $47, $43, $52, $42, $08, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN9
  !DB $EB, $08, $52, $47, $43, $52, $42, $09, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN10
  !DB $EB, $08, $52, $47, $43, $52, $42, $0A, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN11
  !DB $EB, $08, $52, $47, $43, $52, $42, $0B, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN12
  !DB $EB, $08, $52, $47, $43, $52, $42, $0C, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN13
  !DB $EB, $08, $52, $47, $43, $52, $42, $0D, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN14
  !DB $EB, $08, $52, $47, $43, $52, $42, $0E, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN15
  !DB $EB, $08, $52, $47, $43, $52, $42, $0F, $00, $00
EndMacro

Macro REG_CRYPT_BEGIN16
  !DB $EB, $08, $52, $47, $43, $52, $42, $10, $00, $00
EndMacro  
   
Macro REG_CRYPT_END1
  !DB $EB, $08, $52, $47, $43, $52, $45, $01, $00, $00
EndMacro

Macro REG_CRYPT_END2
  !DB $EB, $08, $52, $47, $43, $52, $45, $02, $00, $00
EndMacro

Macro REG_CRYPT_END3
  !DB $EB, $08, $52, $47, $43, $52, $45, $03, $00, $00
EndMacro

Macro REG_CRYPT_END4
  !DB $EB, $08, $52, $47, $43, $52, $45, $04, $00, $00
EndMacro

Macro REG_CRYPT_END5
  !DB $EB, $08, $52, $47, $43, $52, $45, $05, $00, $00
EndMacro

Macro REG_CRYPT_END6
  !DB $EB, $08, $52, $47, $43, $52, $45, $06, $00, $00
EndMacro

Macro REG_CRYPT_END7
  !DB $EB, $08, $52, $47, $43, $52, $45, $07, $00, $00
EndMacro

Macro REG_CRYPT_END8
  !DB $EB, $08, $52, $47, $43, $52, $45, $08, $00, $00
EndMacro

Macro REG_CRYPT_END9
  !DB $EB, $08, $52, $47, $43, $52, $45, $09, $00, $00
EndMacro

Macro REG_CRYPT_END10
  !DB $EB, $08, $52, $47, $43, $52, $45, $0A, $00, $00
EndMacro

Macro REG_CRYPT_END11
  !DB $EB, $08, $52, $47, $43, $52, $45, $0B, $00, $00
EndMacro

Macro REG_CRYPT_END12
  !DB $EB, $08, $52, $47, $43, $52, $45, $0C, $00, $00
EndMacro

Macro REG_CRYPT_END13
  !DB $EB, $08, $52, $47, $43, $52, $45, $0D, $00, $00
EndMacro

Macro REG_CRYPT_END14
  !DB $EB, $08, $52, $47, $43, $52, $45, $0E, $00, $00
EndMacro

Macro REG_CRYPT_END15
  !DB $EB, $08, $52, $47, $43, $52, $45, $0F, $00, $00
EndMacro

Macro REG_CRYPT_END16
  !DB $EB, $08, $52, $47, $43, $52, $45, $10, $00, $00
EndMacro

;}

;{ UNREG_CRYPT 1..16

Macro UNREG_CRYPT_BEGIN1
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $01
EndMacro

Macro UNREG_CRYPT_BEGIN2
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $02
EndMacro

Macro UNREG_CRYPT_BEGIN3
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $03
EndMacro

Macro UNREG_CRYPT_BEGIN4
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $04
EndMacro

Macro UNREG_CRYPT_BEGIN5
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $05
EndMacro

Macro UNREG_CRYPT_BEGIN6
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $06
EndMacro

Macro UNREG_CRYPT_BEGIN7
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $07
EndMacro

Macro UNREG_CRYPT_BEGIN8
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $08
EndMacro

Macro UNREG_CRYPT_BEGIN9
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $09
EndMacro

Macro UNREG_CRYPT_BEGIN10
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $0A
EndMacro

Macro UNREG_CRYPT_BEGIN11
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $0B
EndMacro

Macro UNREG_CRYPT_BEGIN12
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $0C
EndMacro

Macro UNREG_CRYPT_BEGIN13
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $0D
EndMacro

Macro UNREG_CRYPT_BEGIN14
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $0E
  
EndMacro

Macro UNREG_CRYPT_BEGIN15
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $0F
EndMacro

Macro UNREG_CRYPT_BEGIN16
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $10
EndMacro

Macro UNREG_CRYPT_END1
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $01  
EndMacro

Macro UNREG_CRYPT_END2
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $02
EndMacro

Macro UNREG_CRYPT_END3
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $03
EndMacro

Macro UNREG_CRYPT_END4
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $04
EndMacro

Macro UNREG_CRYPT_END5
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $05
EndMacro

Macro UNREG_CRYPT_END6
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $06
EndMacro

Macro UNREG_CRYPT_END7
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $07
EndMacro

Macro UNREG_CRYPT_END8
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $08
EndMacro

Macro UNREG_CRYPT_END9
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $09
EndMacro

Macro UNREG_CRYPT_END10
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $0A
EndMacro

Macro UNREG_CRYPT_END11
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $0B
EndMacro

Macro unreg_crypt_end12
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $0C
EndMacro

Macro UNREG_CRYPT_END13
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $0D
EndMacro

Macro UNREG_CRYPT_END14
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $0E
EndMacro

Macro UNREG_CRYPT_END15
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $0F
EndMacro

Macro UNREG_CRYPT_END16
  !DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $10
EndMacro

;}

Code : Tout sélectionner


;EnigmaProtectConst.pb

Enumeration
  
#WM_PUBLIC  = 1
#WM_PRIVATE = 2

#NUMBER_OF_CRYPTED_SECTIONS = 16

; Ctypt hash types, possible hash values For functions:
; EP_CryptHashBuffer
; EP_CryptHashStringA
; EP_CryptHashStringW
; EP_CryptHashFileA
; EP_CryptHashFileW

#HASH_XOR32     = 0
#HASH_MD2       = 1
#HASH_MD5       = 2
#HASH_RipeMD160 = 3
#HASH_SH1       = 4
#HASH_SHA224    = 5
#HASH_SHA256    = 6
#HASH_SHA384    = 7
#HASH_SHA512    = 8

; Return values of EP_RegKeyStatus
#KEY_STATUS_DOESNOTEXIST                         = 0
#KEY_STATUS_VALID                                = 1
#KEY_STATUS_INVALID                              = 2
#KEY_STATUS_STOLEN                               = 3
#KEY_STATUS_DATEEXPIRED                          = 4
#KEY_STATUS_WITHOUTHARDWARELOCK                  = 5
#KEY_STATUS_WITHOUTEXPIRATIONDATE                = 6
#KEY_STATUS_WITHOUTREGISTERAFTERDATE             = 7
#KEY_STATUS_WITHOUTREGISTERBEFOREDATE            = 8
#KEY_STATUS_WITHOUTEXECUTIONSLIMIT               = 9
#KEY_STATUS_WITHOUTDAYSLIMIT                     = 10
#KEY_STATUS_WITHOUTRUNTIMELIMIT                  = 11
#KEY_STATUS_WITHOUTGLOBALTIMELIMIT               = 12
#KEY_STATUS_WITHOUTCOUNTRYLOCK                   = 13
#KEY_STATUS_COUNTRYINVALID                       = 14
#KEY_STATUS_REGISTERAFTERFAILED                  = 15
#KEY_STATUS_REGISTERBEFOREFAILED                 = 16
#KEY_STATUS_EXECUTIONSEXPIRED                    = 17
#KEY_STATUS_DAYSEXPIRED                          = 18
#KEY_STATUS_RUNTIMEEXPIRED                       = 19
#KEY_STATUS_GLOBALTIMEEXPIRED                    = 20
#KEY_STATUS_HARDWARECHANGESEXCEEDED_VOLUMESERIAL = 21
#KEY_STATUS_HARDWARECHANGESEXCEEDED_VOLUMENAME   = 22
#KEY_STATUS_HARDWARECHANGESEXCEEDED_COMPUTERNAME = 23
#KEY_STATUS_HARDWARECHANGESEXCEEDED_CPU          = 24
#KEY_STATUS_HARDWARECHANGESEXCEEDED_MOTHERBOARD  = 25
#KEY_STATUS_HARDWARECHANGESEXCEEDED_WINDOWSKEY   = 26
#KEY_STATUS_HARDWARECHANGESEXCEEDED_HDDSERIAL    = 27
#KEY_STATUS_HARDWARECHANGESEXCEEDED_USERNAME     = 28
#KEY_STATUS_HARDWAREINVALID                      = 29

; Counties code for EP_MiscCountryCode
#CN_AFGHANISTAN      = 114
#CN_ALBANIA          = 1
#CN_ALGERIA          = 2
#CN_ARGENTINA        = 3
#CN_ARMENIA          = 4
#CN_AUSTRALIA        = 5
#CN_AUSTRIA          = 6
#CN_AZERBAIJAN       = 7
#CN_BAHRAIN          = 8
#CN_BANGLADESH       = 115
#CN_BELARUS          = 9
#CN_BELGIUM          = 10
#CN_BELIZE           = 11
#CN_BOLIVIA          = 116
#CN_BOSNIA           = 117
#CN_BRAZIL           = 13
#CN_BRUNEI           = 14
#CN_BULGARIA         = 15
#CN_CAMBODIA         = 16
#CN_CANADA           = 17
#CN_CARRIBEAN        = 118
#CN_CHILE            = 20
#CN_CHINA            = 21
#CN_COLOMBIA         = 22
#CN_COSTARICA        = 23
#CN_CROATIA          = 24
#CN_CZECH            = 25
#CN_DENMARK          = 26
#CN_DOMINICAN        = 27
#CN_ECUADOR          = 28
#CN_EGYPT            = 29
#CN_ELSALVADOR       = 30
#CN_ESTONIA          = 31
#CN_ETHIOPIA         = 119
#CN_FAROE            = 32
#CN_FINLAND          = 33
#CN_FRANCE           = 34
#CN_GEORGIA          = 35
#CN_GERMANY          = 36
#CN_GREECE           = 37
#CN_GREENLAND        = 120
#CN_GUATEMALA        = 38
#CN_HONDURAS         = 39
#CN_HONGKONG         = 40
#CN_HUNGARU          = 41
#CN_ICELAND          = 42
#CN_INDIA            = 43
#CN_INDONESIA        = 44
#CN_IRAN             = 45
#CN_IRAQ             = 46
#CN_IRELAND          = 47
#CN_ISRAEL           = 48
#CN_ITALY            = 49
#CN_JAMAICA          = 50
#CN_JAPAN            = 51
#CN_JORDAN           = 52
#CN_KAZAKHSTAN       = 53
#CN_KENYA            = 54
#CN_KOREA            = 56
#CN_KUWAIT           = 57
#CN_KYRGYZSTAN       = 58
#CN_LAOS             = 121
#CN_LATVIA           = 59
#CN_LEBANON          = 60
#CN_LIBYAN           = 122
#CN_LIECHTENSTEIN    = 62
#CN_LITHUANIA        = 63
#CN_LUXEMBOURG       = 64
#CN_MACAO            = 65
#CN_MACEDONIA        = 66
#CN_MALAYSIA         = 67
#CN_MALDIVES         = 123
#CN_MALTA            = 124
#CN_MEXOCI           = 68
#CN_MONACO           = 70
#CN_MONGOLIA         = 71
#CN_MONTENEGRO       = 125
#CN_MOROCCO          = 72
#CN_NEPAL            = 126
#CN_NETHERLANDS      = 73
#CN_NEWZEALAND       = 74
#CN_NICARAGUA        = 75
#CN_NIGERIA          = 127
#CN_NORWAY           = 76
#CN_OMAN             = 77
#CN_PAKISTAN         = 78
#CN_PANAMA           = 79
#CN_PARAGUAY         = 80
#CN_PERY             = 81
#CN_PHILIPPINES      = 82
#CN_POLAND           = 83
#CN_PORTUGAL         = 84
#CN_PUERTORICO       = 85
#CN_QATAR            = 86
#CN_ROMANIA          = 87
#CN_RUSSIA           = 88
#CN_RWANDA           = 128
#CN_SAUDIARABIA      = 89
#CN_SENEGAL          = 129
#CN_SERBIA           = 130
#CN_SERBIAMONTENEGRO = 90
#CN_SINGAROPE        = 91
#CN_SLOVAKIA         = 92
#CN_SLOVENIA         = 93
#CN_SOUTHAFRICA      = 94
#CN_SPAIN            = 95
#CN_SRILANKA         = 131
#CN_SWEDEN           = 96
#CN_SWITZERLAND      = 97
#CN_SYRIAN           = 132
#CN_TAIWAN           = 98
#CN_TAJIKISTAN       = 99
#CN_THAILAND         = 100
#CN_TRINIDADTOBAGO   = 101
#CN_TUNISIA          = 102
#CN_TURKEY           = 103
#CN_TURKMENISTAN     = 133
#CN_UKRAINE          = 104
#CN_UAE              = 105
#CN_UNITEDKINGDOM    = 106
#CN_USA              = 107
#CN_URUGUAY          = 108
#CN_UZBEKISTAN       = 109
#CN_VENEZUELA        = 110
#CN_VIETNAM          = 111
#CN_YEMEN            = 112
#CN_ZIMBABWE         = 113

EndEnumeration

Structure TKeyCountries
    Name.s
    Code.l
EndStructure

Structure TWMContent
    WMType.l
    Name.s
    NameLen.l
    Text.s
    TextLen.l
    FileName.s
    FileNameLen.l
    AFile.s
    AFileLen.l
EndStructure
  
Structure TKeyInformation
    Stolen.l              ;{out} is key stolen? Boolean - check value against zero
    CreationYear.l        ;{out} key creation year
    CreationMonth.l       ;{out} key creation month
    CreationDay.l         ;{out} key creation day
    UseKeyExpiration.l    ;{out} has key expiration date? Boolean - check value against zero
    ExpirationYear.l      ;{out} key expiration year
    ExpirationMonth.l     ;{out} key expiration month
    ExpirationDay.l       ;{out} key expiration day
    UseHardwareLocking.l  ;{out} hardware locked key? Boolean - check value against zero
    UseExecutionsLimit.l  ;{out} limit key by executions? Boolean - check value against zero
    ExecutionsCount.l     ;{out} number of executions
    UseDaysLimit.l        ;{out} limit key by days? Boolean - check value against zero
    DaysCount.l           ;{out} number of days
    UseRunTimeLimit.l     ;{out} limit key by run time? Boolean - check value against zero
    RunTimeMinutes.l      ;{out} run time minutes
    UseGlobalTimeLimit.l  ;{out} limit key by global time? Boolean - check value against zero
    GlobalTimeMinutes.l   ;{out} Global time minutes
    UseCountyLimit.l      ;{out} limit key by country? Boolean - check value against zero
    CountryCode.l         ;{out} country code
    UseRegisterAfter.l    ;{out} register key after date? Boolean - check value against zero
    RegisterAfterYear.l   ;{out} register after year
    RegisterAfterMonth.l  ;{out} register after month
    RegisterAfterDay.l    ;{out} register after day
    UseRegisterBefore.l   ;{out} register key before date? Boolean - check value against zero
    RegisterBeforeYear.l  ;{out} register before year
    RegisterBeforeMonth.l ;{out} register before month
    RegisterBeforeDay.l   ;{out} register before day
    
    EncryptedSections.b[#NUMBER_OF_CRYPTED_SECTIONS - 1] ;{out} Crypted sections? Boolean - check value against zero
    
EndStructure

Code : Tout sélectionner


;Enigma_APIS.pbl

enigma_ide.dll

; Registration API

EP_RegSaveKey 2
EP_RegLoadKey 2
EP_RegCheckKey 2
EP_RegDeleteKey 0
EP_RegLoadAndCheckKey 0
EP_RegCheckAndSaveKey 2
EP_RegHardwareID 0
EP_RegKeyCreationDate 3
EP_RegKeyCreationDateEx 0
EP_RegKeyExpirationDate 3
EP_RegKeyExpirationDateEx 0
EP_RegKeyExecutions 2
EP_RegKeyExecutionsTotal 0
EP_RegKeyExecutionsLeft 0
EP_RegKeyDays 2
EP_RegKeyDaysTotal 0
EP_RegKeyDaysLeft 0
EP_RegKeyRuntime 2
EP_RegKeyRuntimeTotal 0
EP_RegKeyRuntimeLeft 0
EP_RegKeyGlobalTime 2
EP_RegKeyGlobalTimeTotal 0
EP_RegKeyGlobalTimeLeft 0
EP_RegKeyRegisterAfterDate 3
EP_RegKeyRegisterAfterDateEx 0
EP_RegKeyRegisterBeforeDate 3
EP_RegKeyRegisterBeforeDateEx 0
EP_RegKeyInformation 3
EP_RegKeyStatus 0
EP_RegShowDialog 0

; Online Activation API

EP_ActivationShowDialog 0

; Trial API

EP_TrialExecutions 2
EP_TrialExecutionsTotal 0
EP_TrialExecutionsLeft 0
EP_TrialDays 2
EP_TrialDaysTotal 0
EP_TrialDaysLeft 0
EP_TrialExpirationDate 3
EP_TrialExpirationDateEx 0
EP_TrialDateTillDate 6
EP_TrialDateTillDateStartEx 0
EP_TrialDateTillDateEndEx 0
EP_TrialExecutionTime 2
EP_TrialExecutionTimeTotal 0
EP_TrialExecutionTimeLeft 0
EP_TrialClockReversedDays 0

;Misc API

EP_MiscGetWatermark 2
EP_MiscCountryCode 0
EP_SplashScreenShow 0
EP_SplashScreenHide 0

;Protection API

EP_ProtectedStringByID 3 
EP_ProtectedStringByKey 3

;Crypt API TODO

EP_CryptHashBuffer 4
EP_CryptHashFileA 3
EP_CryptHashFileW 3
EP_CryptHashStringA 3
EP_CryptHashStringW 3
EP_CryptEncryptBuffer 3
EP_CryptEncryptBufferEx 4        
EP_CryptDecryptBuffer 3
EP_CryptDecryptBufferEx 4

; Checkup API

EP_CheckupCopies 2
EP_CheckupCopiesTotal 0
EP_CheckupCopiesCurrent 0
EP_CheckupIsProtected 0
EP_CheckupIsEnigmaOk 0
EP_CheckupFindProcess 3
EP_CheckupVirtualizationTools 0

; Enigma API

EP_EnigmaVersion 0

C'est complet :)

Si qqun fait les imports je veux bien....petit souci de polib.

Pour les exemples c'est bientôt... peut etre apres le cafe si j'ai le temps, sinon demain

http://www.enigmaprotector.com/en/help.html
CaptainCrunch
Messages : 52
Inscription : dim. 29/juin/2014 6:32

Re: The Enigma Protector

Message par CaptainCrunch »

Re :D

Pour les tests :

- Vérifier la présence du fichier "enigma_ide.dll" dans le même répertoire que votre programme.

- Pour l'éxécution sous l'IDE de Purebasic, vérifier également la présence de cette dll dans le répertoire de compilation..... Afin d'éviter les erreurs.

- Les APIS ne seront effectivent "qu'après" protection de l'éxécutable

Bon, pour ce petit test dans énigma protector

- Créer un projet, en lui indiquant le fichier d'origine, et le fichier de destination

[Settings -> Input]

- Lui indiquer le type de clef

[Registration Features -> Registration KeysType ] Pour l'éxemple, RSA 4096, base 16

- Le HardwareLock....

[Registration Features -> HardwareLock] Moi je choisis ' HardDisk Serial Number'


Sauvegarder le tout.... et "PROTECT"

Voila le fichier d'origine à été protégé. Pas besoin de "enigma_ide.dll" il est autonome

A garder précieusement, votre projet.enigma.

Après le café, j'expliquerai qq APIS.

EP_RegHardwareID_()
EP_RegCheckKey_()
EP_RegKeyStatus_()
CaptainCrunch
Messages : 52
Inscription : dim. 29/juin/2014 6:32

Re: The Enigma Protector

Message par CaptainCrunch »

Code : Tout sélectionner

; Exemple Simple 

IncludeFile "EnigmaProtectConst.pb"
;IncludeFile "EnigmaMarkers.pb" ; Pas besoin dans cet exemple

Define ptIdEx.l, MonId.s

Define Nom.s, Serial.s
Define RetCheckKey.i, RetKeyStatus.i

;**********************************************************************

ptIdEx = EP_RegHardwareID_()   ; Récupération de l'ID de la machine

MonId = PeekS(ptIdEx)             ; ptIdEx désigne un pointeur

;**********************************************************************

Nom  = "Test"

; Pour tester, vous pouvez générer un sérial avec le générateur inclus dans Enigma [Tools -> Keygen]

Serial = "AAAAAAAAAA..."

;**********************************************************************

RetCheckKey  = EP_RegCheckKey_(Nom, Serial) ; Vérification du sérial, retourne 1 si OK
                      
RetKeyStatus = EP_RegKeyStatus_() ; A utiliser apès EP_RegCheckKey et retourner le status de la clef, serial ( voir EnigmaProtectConst.pb)

If RetKeyStatus = #KEY_STATUS_VALID
                         
      Select RetCheckKey
        Case 1
          MessageRequester("","Merci d'avoir enregistré votre logiciel.",#PB_MessageRequester_Ok)
        Default
          MessageRequester("","Numéro de série invalide.",#PB_MessageRequester_Ok)
      EndSelect
    Else
      
MessageRequester("","Numéro de série invalide.",#PB_MessageRequester_Ok)
                   
EndIf
                    
Avatar de l’utilisateur
graph100
Messages : 1318
Inscription : sam. 21/mai/2005 17:50

Re: The Enigma Protector

Message par graph100 »

Quel travail ! Un grand merci ! Ça va faire référence !
_________________________________________________
Mon site : CeriseCode (Attention Chantier perpétuel ;))
Backup
Messages : 14526
Inscription : lun. 26/avr./2004 0:40

Re: The Enigma Protector

Message par Backup »

en fait ça sert a generer un Serial ? ...

et ce serial s'il est valide ça lance le programme c'est ça ? (jespere que c'est plus complexe que ça)
que ça crypte entierement le code
car
que ce passerai t'il si au lieu de

Code : Tout sélectionner

If RetKeyStatus = #KEY_STATUS_VALID
                         
      Select RetCheckKey
        Case 1
          MessageRequester("","Merci d'avoir enregistré votre logiciel.",#PB_MessageRequester_Ok)
        Default
          MessageRequester("","Numéro de série invalide.",#PB_MessageRequester_Ok)
      EndSelect
    Else
      
MessageRequester("","Numéro de série invalide.",#PB_MessageRequester_Ok)
                   
EndIf
                    
tu te retrouve avec :

Code : Tout sélectionner

Goto TototheCrackerBelin
 If RetKeyStatus = #KEY_STATUS_VALID
                         
     Select RetCheckKey
        Case 1
TototheCrackerBelin :
          MessageRequester("","Merci d'avoir enregistré votre logiciel.",#PB_MessageRequester_Ok)
        Default
          MessageRequester("","Numéro de série invalide.",#PB_MessageRequester_Ok)
      EndSelect
    Else
      
MessageRequester("","Numéro de série invalide.",#PB_MessageRequester_Ok)
                   
EndIf
                    
hein ? que ce passerai t'il ?
CaptainCrunch
Messages : 52
Inscription : dim. 29/juin/2014 6:32

Re: The Enigma Protector

Message par CaptainCrunch »

Il faut regarder la doc Dobro :D :lol: Machine de guerre ahahah :-)

C'était juste un exemple pour montrer l'utilisation "de base"

Mais pour l'élaboration d'une protection complexe, il faut utiliser tout l'arsenal d'enigma.

Très dur à cracker.

Tu auras des exemples si tu veux :-) J'ai enfin recu ma license 8)

http://enigmaprotector.in/en/help/manua ... ddb174368c
G-Rom
Messages : 3627
Inscription : dim. 10/janv./2010 5:29

Re: The Enigma Protector

Message par G-Rom »

Mouais...
The Enigma Protector will make your software resistant to cracking, and thus will increase your sales
En plus , ils te font avaler des couleuvres en te faisant croire que ton soft résistera au crack & que tes ventes vont augmenter...
Je ne vais pas trollé plus ici, j'ai pas trouvé le crack de "Microsoft Visual Studio 2010 Ultimate edition" , je vais donc de ce pas l'acheter... ( 16.000€... ) :mrgreen:

Sinon , bravo à ton travail tout de même , cela à dû être des heures de recherches & de test ;)
Lemaquis
Messages : 271
Inscription : mer. 25/déc./2013 7:34
Localisation : la corse

Re: The Enigma Protector

Message par Lemaquis »

G-Rom a écrit :Mouais...
The Enigma Protector will make your software resistant to cracking, and thus will increase your sales
En plus , ils te font avaler des couleuvres en te faisant croire que ton soft résistera au crack & que tes ventes vont augmenter...
Je ne vais pas trollé plus ici, j'ai pas trouvé le crack de "Microsoft Visual Studio 2010 Ultimate edition" , je vais donc de ce pas l'acheter... ( 16.000€... ) :mrgreen:

Sinon , bravo à ton travail tout de même , cela à dû être des heures de recherches & de test ;)

tu as mal cherché :
Dernière modification par Lemaquis le ven. 18/juil./2014 9:43, modifié 1 fois.
LeMaquis
G-Rom
Messages : 3627
Inscription : dim. 10/janv./2010 5:29

Re: The Enigma Protector

Message par G-Rom »

Lemaquis a écrit :
G-Rom a écrit :Mouais...
The Enigma Protector will make your software resistant to cracking, and thus will increase your sales
En plus , ils te font avaler des couleuvres en te faisant croire que ton soft résistera au crack & que tes ventes vont augmenter...
Je ne vais pas trollé plus ici, j'ai pas trouvé le crack de "Microsoft Visual Studio 2010 Ultimate edition" , je vais donc de ce pas l'acheter... ( 16.000€... ) :mrgreen:

Sinon , bravo à ton travail tout de même , cela à dû être des heures de recherches & de test ;)

tu as mal cherché :

https://jenequotepasdurl.com
T'es sympa, le forum & la communauté interdit le partage de warez/crack/keygen/etc...
Merci de supprimé ton lien.
Lemaquis
Messages : 271
Inscription : mer. 25/déc./2013 7:34
Localisation : la corse

Re: The Enigma Protector

Message par Lemaquis »

Excuses GRom , je voulais juste d'aider .
LeMaquis
CaptainCrunch
Messages : 52
Inscription : dim. 29/juin/2014 6:32

Re: The Enigma Protector

Message par CaptainCrunch »

Quel remue-ménage :lol:

A la base c'était juste pour partager.

Pour ceux qui ne connaissent pas le sujet,

Enigma à une bonne résistance, allez voir du côté des forums spécialisés.

Alors oui je sais, il existe qq techniques d'unpacking, mais c'est sur d'anciennes versions

Les tutos sur enigma sont rares, et pas à jour... tout le contraire d'asprotect & armadillo

Et ce n'est pas à la portée de Monsieur Tout-le-monde ...

Ida ou ollydbg, je demande à voir

:D
Avatar de l’utilisateur
graph100
Messages : 1318
Inscription : sam. 21/mai/2005 17:50

Re: The Enigma Protector

Message par graph100 »

@G-Rom : vire moi ta citation :lol:
_________________________________________________
Mon site : CeriseCode (Attention Chantier perpétuel ;))
G-Rom
Messages : 3627
Inscription : dim. 10/janv./2010 5:29

Re: The Enigma Protector

Message par G-Rom »

graph100 a écrit :@G-Rom : vire moi ta citation :lol:
Tu as fumé quoi ? :lol:
si tu parles du lien , il à été modifié lors du "quotage" ;)
Répondre