This tool is a chimera between Obfuscator and Crypter.
It should be able to be used in many ways.
With AES based encryption.
Inclusive AES enhanced password creator.
Extremelly fast - Converts on my machine more as 171,000 characters in one second.
It is as easy to handle as UCase and LCase.
It does not destroy a text, string, or script and keeps its formatting.
But it makes it impossible to even begin to recognize what it actually is or to edit or make something readable.
Strings can be converted on the fly.
It is a basic code, which you can easily use or adapt to create e.g. a specific obfuscator or crypter for many things.
The process of converting plain text components, for example, can be automated very easily.
A customized obfuscator for source codes should be able to be very quickly created.
The Shift parameter transfers the used character set for the encrypted text arbitrarily.
Once you understand this, it's very easy and nice.
It always depends on what you want.
Have fun.
This looks as sample so :
Try as sample shift=$A000 - with latin based source text
With latin based source text
With hidden characters - Character offset $E600
Code: Select all
DeclareModule Obfuscator_QAES
EnableExplicit
UseMD5Fingerprint()
Declare.s Obfuscator_QAES(string$, mode, password$="", strongness=4, shift=200)
EndDeclareModule
Module Obfuscator_QAES
Procedure.s Obfuscator_QAES(string$, mode, password$="", strongness=4, shift=200)
; Obfuscator / TextCrypter - AES enhanced - x86/64 - Unicode - This code is free for changing and enhancing
; No warranty whats ever - Using on your own risk
; mode=0 - encode // mode=1 - decode
; shift - Shift to visible encrypted characters - Mostly you must not change the preset
; strongness - 3 > 6 - preset=4 - This is the AES based randomized max shift - 3=31 - 4=63 - 5=127 - 6=255
Dim register.q(1)
If SizeOf(character)=1 : ProcedureReturn "Created for Unicode" : EndIf
If string$="" : ProcedureReturn "" : EndIf
If strongness<3 : strongness=3 : EndIf : If strongness>6 : strongness=6 : EndIf
Protected string_length=StringByteLength(string$)-2 : strongness=6-strongness
Protected i, ii, iii, depth, *pos_w.word, fixed$=StringFingerprint(password$+"%$(s4DäÖ", #PB_Cipher_MD5)
Repeat ; 16 Bytes
PokeA(@register(0)+i, Val("$"+PeekS(@fixed$+ii, 2))) : ii+SizeOf(character)<<1 : i+1 ; Create a key
Until ii=StringByteLength(fixed$) : i=0 : ii=0
Repeat
Repeat
If Not iii : AESDecoder(@register(0), @register(0), 16, @register(0), 128, 0, #PB_Cipher_ECB) : EndIf
depth=PeekA(@register(0)+iii)>>strongness : iii+1 : If iii>15 : iii=0 : EndIf
Until depth
depth=depth+shift : *pos_w=@string$+i
If *pos_w\w<>10 And *pos_w\w<>13 : If mode : *pos_w\w-depth : Else : *pos_w\w+depth : EndIf : EndIf
i+2 : *pos_w+2
Until i>string_length
ProcedureReturn string$
EndProcedure
EndModule
UseModule Obfuscator_QAES
; ###### Get the result ######
CompilerIf #PB_Compiler_IsMainFile
EnableExplicit
Procedure.s CreatePassword_QAES(password$, salt$="", enhancement$="")
If password$=""
Protected requester=1
password$=InputRequester("Set your passord", "I put the result it in your clipboard", "")
EndIf
Protected password_1$=Obfuscator_QAES(password$, 0, password$+salt$, 6)+enhancement$
If requester
SetClipboardText(password_1$)
MessageRequester("Obfuscator_QAES - Password generating"+Space(50),
"The password is now in your clipboard"+#LF$+#LF$+
"Complexity : "+Len(password$)+" ^ 255"+#LF$+#LF$+
"Extension for optimal acceptance : "+enhancement$+#LF$+#LF$+#LF$+
password$+#LF$+#LF$+
password_1$+#LF$+#LF$+#LF$+
"Closing the window clear your clipboard")
SetClipboardText("")
password$=#Null$
ProcedureReturn password_1$
EndIf
password$=#Null$
ProcedureReturn password_1$
EndProcedure
Define string$="Hello World"+#LF$+
"How are you ?"+#LF$+
"I hope you are well"+#LF$+
"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"+#LF$+
"the quick brown fox jumps over the lazy dog"+#LF$+
"0123456789"+#LF$+
"+#§$%&/()=[]\!?-"+#LF$+
"Have fun with "+Chr(34)+"QAES"+Chr(34)+" crypting tools"
Define password$="My Password" ; Password
Define shift=$C8 ; $E600 ; Shift to visible encrypted characters - UCS-2 - Mostly you must not change the preset
; For example, if you use $E600 as shift instead of $C8,
; the characters are automatically anonymized and cannot be distinguished visually.
Define strongness=4 ; Strongness - 3 to 6
; ################### Test part 1 ###################
Debug "###### encoded ######"
Define result$=Obfuscator_QAES(string$, 0, password$, strongness, shift) ; Encode - Mode 0
Debug result$
Debug " "
Debug "###### decoded ######"
Define result$=Obfuscator_QAES(result$, 1, password$, strongness, shift) ; Decode - Mode 1
Debug result$
Define i, ii, iii=Len(string$)+3
Define loops=3000 ; Test loops - This test your config
Define test_range=255 ; Character space Ascii
Debug ""
Debug "### WAIT ###"
Delay(1200)
Define time=ElapsedMilliseconds()
For i=1 To loops
string$+Chr(Random(test_range-1)+1)+Chr(Random(test_range-1)+1)+Chr(Random(test_range-1)+1)
Define result_0$=Obfuscator_QAES(string$, 0, password$+Str(i), strongness, shift) ; Encode - mode 0
Define result_1$=Obfuscator_QAES(result_0$, 1, password$+Str(i), strongness, shift) ; Decode - mode 1
If result_1$<>string$ : Debug "Fail : "+ i : End : EndIf
ii+1 : If ii=100 : ii=0 : Debug i : EndIf
Next i
time=(ElapsedMilliseconds()-time)/1000
Debug "All OK : "+Str(iii*loops*2/time)+" Characters coded in one second"
Debug ""
; ############ Test Part 2 - Password creating #############
Debug "Password creating demo"
Define salt$="Salt_479()x*#" ; You must not set
Define enhancement$="_@35ahDB" ; Extension for optimal acceptance - You must not set
Define password$="Hello Password" ; Leave empty to call a dialog
Debug CreatePassword_QAES(password$, salt$, enhancement$)
; ################### Test Part 3 Sample ###################
string$="ĦŚņųĹėĨũťľŅ"+#LF$+
"ĤĹŵûĹņļĜŌňŁêĊ"+#LF$+
"ėąťųųŕĊŽĸťðįĻŐĆūŕŊŗ"+#LF$+
"ōŇʼnĀğĽʼnĖĻîĝĥĠĭIJôĮĨĢóŋĪŌĦĮøőōġʼnĉĠĖďïĘĢıŃĤģĠĕ"+#LF$+
"ŠŗŒĈŗ੹ŏĦŖŖĻœšĉšŲŒĖşşŜőťĆŭżŢĽĄŗţŕìĸŒŞŹĔłŢŏ"+#LF$+
"ijĀĆĐąĶĝđĭĎ"+#LF$+
"ĮĩƇĀïĜğĞøĎŋňĴČđÿ"+#LF$+
"ĵřŒŔĥĻŜńăŬůŴŭĝùĸĭĪġĨĉŊʼnŗŕʼnťŐŠęĿŔűŁů"
Define password$="My Password" ; Password
Define shift=$C8 ; Shift to visible encrypted characters - UCS-2
Define strongness=4 ; Strongness - 3 to 6
MessageRequester("Obfuscator_QAES", Obfuscator_QAES(string$, 1, "My Password", strongness, shift))
CompilerEndIf
http://www.columbia.edu/kermit/ucs2.html