hey rtfc, first and foremost i want to thank you for your awesome work!
I already stumbled upon it a couple of weeks ago, but decided to work with your script first for some time befor wasting your time with stupid questions.
At first i had some troubles obfuscating and encrypting my script (3000 lines of code) but after optimizing my script on several ends the output is not only working perfectly, it also looks pretty great.
Sadly I'm stuck now trying to create a function to decrypt the script using a server response.
My exact case :
.) nKey is automaticly beeing created and handed over to customer
.) nKey status is verifieable via get request to web-api
.) if nkey status = active -> decrypt
Since the nKey is known to my clients anyway and i want to make this endevor as painfree to them as possible my thoughts are :
First time they start their software ($nKey=0) a msgbox should appear that asks them to input their serial which is then stored in the ini (and $nKey=realvalue) and should be used as variable in the get request.
I'm able to do the webrequest, but how do i get the var $nkey into the _MCFCC_init function?
Func getulkey($pdid, $login, $mail)
Local $out
HttpSetUserAgent($pdid)
$gdata = InetRead($activurl & "&email=" & $mail & "&licence_key=" & $login & "&request=status" & "&product_id=" & $pdid, 1)
$nbytesread = @extended
Local $fData = BinaryToString($gData)
Local $hData = StringRegExp($fData, '"(\w+)":([^,\{\}]+),?', 3)
If IsArray($hData) or UBound($hData) <> 19 Then
Return $hdata
ElseIf IsArray($hData) or UBound($hData) <> 8 Then
Return -1
EndIf
Return $hData
EndFunc
Func chill()
checkulkey($pdid, $login, $mail)
EndFunc
Now with my checkulkey function i tried several things.
For one :
Func checkulkey($pdid, $login, $mail)
Return _MCFCC_Init(getulkey($pdid, $login, $mail))
EndFunc
This calls the mfcinit though and I can't even start the decrypter.
Then i tried :
and set $CCkey[8]=$ulkey[3]
which gave me an array error.
Could you maybe give me some tips on how you would best solve an auto-decryption via a positive serial-authentification?
One thing that I plan to implement later was to add a check that opens an inputbox in case the serial is not stored in the ini so users can add it themselves befor starting the webrequest. This should be no problem though once I managed to establish a basic functionality, right?