Hello
I need to obfuscate (encode-decode) some large string to make it unreadable if someone rightclick my .exe.
But its large, very large (2 pages of a javascript).
Need to be able to read itself the .exe and decode it. Dont want to use well know methods but some custom ones (to make harder the decode by curios)... any suggestion?
Thanks in advance.
I need to obfuscate (encode-decode) some large string
I need to obfuscate (encode-decode) some large string
ARGENTINA WORLD CHAMPION
ATM im using this idea:
It works, but dont know if my idea is primitive, there are better ones, etc.
The point is that not alwasy letter 'A' will replaced by the same on the encoded string. I know this can be hacked, but im just doing this for hidde the code, not for avoiding professional hackers, just avoid curios people.
Then, hello world, hello world, hello world encoding with Nn as 3, gets igopp"zssng0!jhpmq#{ptoh-"kimnr$xqupe and encoding it with Nn as 19 gets igopt&~w{vo8-vt|}
Code: Select all
Procedure.s Encode(string$,Nn)
For Char = 1 To Len(string$)
Letra$ = Mid(string$,Char,1)
EncNum+1
Codificado$ = Codificado$ + Chr(Asc(Letra$) + EncNum)
If EncNum > Nn
EncNum = 0
EndIf
Next
ProcedureReturn Codificado$
EndProcedure
Procedure.s Decode(string$,Nn)
For Char = 1 To Len(string$)
Letra$ = Mid(string$,Char,1)
EncNum+1
Codificado$ = Codificado$ + Chr(Asc(Letra$) - EncNum)
If EncNum > Nn
EncNum = 0
EndIf
Next
ProcedureReturn Codificado$
EndProcedure
The point is that not alwasy letter 'A' will replaced by the same on the encoded string. I know this can be hacked, but im just doing this for hidde the code, not for avoiding professional hackers, just avoid curios people.
Then, hello world, hello world, hello world encoding with Nn as 3, gets igopp"zssng0!jhpmq#{ptoh-"kimnr$xqupe and encoding it with Nn as 19 gets igopt&~w{vo8-vt|}
ARGENTINA WORLD CHAMPION
This could be better:
Using Nn as 19 and Added as 2
hello world, hello world, hello world becomes:
jirty,…„€f0&poxz2‹qvrl6,vu~€q$}w|xr
Using Nn as 19 and Added as 3
hello world, hello world, hello world becomes:
kkux~2Œrxup;2}hru{/‰„urm8/zzorx,†
Code: Select all
Procedure.s Encode(string$,Nn,Added)
For Char = 1 To Len(string$)
Letra$ = Mid(string$,Char,1)
EncNum+Added
Codificado$ = Codificado$ + Chr(Asc(Letra$) + EncNum)
If EncNum > Nn
EncNum = 0
EndIf
Next
SetClipboardText(Codificado$)
ProcedureReturn Codificado$
EndProcedure
Procedure.s Decode(string$,Nn,Added)
For Char = 1 To Len(string$)
Letra$ = Mid(string$,Char,1)
EncNum+Added
Codificado$ = Codificado$ + Chr(Asc(Letra$) - EncNum)
If EncNum > Nn
EncNum = 0
EndIf
Next
ProcedureReturn Codificado$
EndProcedure
hello world, hello world, hello world becomes:
jirty,…„€f0&poxz2‹qvrl6,vu~€q$}w|xr
Using Nn as 19 and Added as 3
hello world, hello world, hello world becomes:
kkux~2Œrxup;2}hru{/‰„urm8/zzorx,†
Last edited by ricardo on Tue Mar 29, 2005 5:43 am, edited 1 time in total.
ARGENTINA WORLD CHAMPION

