genmce wrote:
Hey I tested this out and it works great!
How do I use keygen.hkml above with this?
I tried putting it in the www folder but got an error...
Try this:
www/keygen.hkml
Code:
<?ahk keygen() ?>
scripts/keygen.ahk
Code:
keygen(get, post)
{
; Initialize the secret seeds
SWP_Initialize(0x12345678, 0x12345678) ; with optional 8 secret seeds
; Read the values
AppName := get.AppName
Version := get.Version
Name := get.Name
Email := get.Email
Fingerprint := get.Fingerprint
IP := get.IP
; Generate a key for me
Key := SWP_GenerateKey(Name, Email, Fingerprint )
; Test if user details are valid - disabled as always false for me.
; UserOK := SWP_IsUserAuthenticated(Name, Email, Key )
; Remove %20 from fields
StringReplace, Name, Name,`%20, %a_space% , All
StringReplace, AppName, AppName,`%20, %a_space% , All
; Record to the log file
FileAppend, %Name%`,%Email%`,%Fingerprint%`,%Key%`,%AppName%`,%Version%`,%IP%`n, Registrations.txt
return Key
; Return the generated key
; echo(Key)
; soundbeep
}
If this works for you, would you mind posting the client side scripts to use with this, using test server settings: 127.0.0.1:81
uptdates to
ahkbb2.1:
1. added keygen
2. made the number of worker threads a variable (using 2 by default to make testing faster when I don't need more workers)
3. added posts and comments to ahkbb (127.0.0.1:81/ahkbb.hkml)