Search found 299 matches

by pneumatic
27 Nov 2019, 21:03
Forum: Ask For Help
Topic: AHK Script Encryption Topic is solved
Replies: 50
Views: 9495

Re: AHK Script Encryption Topic is solved

you can compile your ahk script and use the default password of "AutoHotkey" for the encryption. that requires no modifications. just download the release files linked. if you want to change that PW (or add better encryption), you need to change it internally within the AHK source, which is simply ...
by pneumatic
27 Nov 2019, 20:29
Forum: Ask For Help
Topic: AHK Script Encryption Topic is solved
Replies: 50
Views: 9495

Re: AHK Script Encryption Topic is solved

Seems like you might want to try AutoHotkey_H first Unfortunately I can't do this as I've already written 40,000+ lines in AHK_L. I'm even locked into using v1.1.24.03 as I can't trust later versions won't break something. AutoHotkey_H is a superset of AHK_L. So your script for _L should work fine ...
by pneumatic
27 Nov 2019, 16:26
Forum: Ask For Help
Topic: AHK Script Encryption Topic is solved
Replies: 50
Views: 9495

Re: AHK Script Encryption Topic is solved

Seems like you might want to try AutoHotkey_H first you might want to write it directly in C/C++, Object Pascal, Rust, Go, etc... Unfortunately I can't do this as I've already written 40,000+ lines in AHK_L. I'm even locked into using v1.1.24.03 as I can't trust later versions won't break something...
by pneumatic
26 Nov 2019, 22:55
Forum: Ask For Help
Topic: AHK Script Encryption Topic is solved
Replies: 50
Views: 9495

Re: AHK Script Encryption Topic is solved

Here is how I imagine a solution might work: 1. Encrypt your .ahk file using jNizM's CNG API . 2. In ahk's script.cpp , rewrite OpenIncludedFile() to decrypt your script, eg: ts.Open(textbuf, TextStream::READ | TextStream::EOL_CRLF | TextStream::EOL_ORPHAN_CR, CP_UTF8); Replace with: ts.Open(Decrypt...
by pneumatic
25 Nov 2019, 15:56
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 68
Views: 42986

Re: CNG (Cryptography API: Next Generation)

jNizM wrote:
25 Nov 2019, 03:34
The lib uses bcrypt.dll and not advapi32.dll
Sorry my mistake. For some reason I'm still using your older HashCalc library for the hashing and your new CNG for the encrypting. Not sure why I ended up doing it that way tbh :lol:
by pneumatic
25 Nov 2019, 15:44
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

Why you dont sign your exe with a certificate? Thanks for the suggestion, and I might do that anyway, but I've since come across that tool (I won't link it) which decompresses the >AHK WITH ICON< resource, which makes it too easy to exploit, so I'm now rethinking the whole thing. Other solutions I'...
by pneumatic
24 Nov 2019, 22:17
Forum: Ask For Help
Topic: Convert >19 digit number to string Topic is solved
Replies: 3
Views: 352

Re: Convert >19 digit number to string Topic is solved

Aha, this one works

Code: Select all

If ("" . string1 = "" . string2)
msgbox true
by pneumatic
24 Nov 2019, 22:06
Forum: Ask For Help
Topic: Convert >19 digit number to string Topic is solved
Replies: 3
Views: 352

Convert >19 digit number to string Topic is solved

I want to compare two strings but ahk keeps interpreting them as numbers which has a 19 digit limit. For integers, 64-bit signed values are supported, which range from -9223372036854775808 (-0x8000000000000000) to 9223372036854775807 ;19 digits string1 := "14887102821589797144" ;20 digits string2 :=...
by pneumatic
24 Nov 2019, 21:07
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

If you want to protect the source code google "ahk obfuscation" Yeah I looked into that some time ago and came to the conclusion that it was a bit questionable in terms of reliability as I read some posts about how it couldn't correctly handle certain syntax or caused bugs in the app. I think I'm o...
by pneumatic
24 Nov 2019, 19:52
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

Chunjee wrote:
24 Nov 2019, 14:41
pneumatic wrote:
24 Nov 2019, 14:16
I'm trying to implement my own encryption algorithm
don't
And now I'm starting to see why you are right - performing mathematical operations can result in a loss of precision which makes the hash no longer unique :roll:
by pneumatic
24 Nov 2019, 19:37
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

Then I use bit shift left : MsgBox, % StrLen("abcd") "`n" StrLen("abcd") << 1 So in unicode ahk, strings are twice as large, therefore loop twice as much. Now I get it :) MsgBox, % !!A_IsUnicode ; if unicode — 1, else 0 But why the double NOTs? edit: ah because it could be blank. Thought it would b...
by pneumatic
24 Nov 2019, 18:00
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

Thanks, and that seems to do the same as Asc(), except you are converting it to a hex whereas Asc() converts it to decimal. But I'm not sure the ordering is right because Asc() produces "97 98 99" for "a b c" whereas your algorithm reverses the order ("99 98 97" in decimal, or "63 62 61" in hex) Sin...
by pneumatic
24 Nov 2019, 16:56
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

I think Asc() might do the trick. It won't be the string's binary data interpreted as an integer [edit: it seems that it actually is], but it will be a unique integer for each character in the string, which is all I really need to allow performing maths on it.
by pneumatic
24 Nov 2019, 16:39
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

Damn, so what is the number retrieved by NumGet()? It does change for certain strings (long ones vs short ones) just not the strings you happened to specify. But it doesn't change enough to provide security.

Similar thing with MsgBox, % Format( "{1:i}" , "3bea1dd4dec09f279d24ccea3c138735" )
by pneumatic
24 Nov 2019, 15:33
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

For fun, here's how my system would work. Criticism encouraged! 1. Compile and MPRESS the script to an exe 2. Generate hash of exe and convert to number with NumGet() 3. "Encrypt" the number by performing some arbitrary convoluted maths on the number 4. Store result of (3) on disk somewhere, prefera...
by pneumatic
24 Nov 2019, 15:13
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

I just realised, I don't need to convert it back to a string when I could just compare the result of NumGet() to a copy stored on disk.

But I'm still curious to know if there is a way to convert a var's binary data to a string.
by pneumatic
24 Nov 2019, 15:01
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

Chunjee wrote:
24 Nov 2019, 14:47
I always just append the number to a blank string:

Code: Select all

number := 8
str := "" number
msgbox, % str
; => "8"
But I want to convert its binary data back to Unicode characters.

I think this does the same as your example

Code: Select all

string := Format( "{1:s}" , 123)
msgbox % string
by pneumatic
24 Nov 2019, 14:52
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Re: Convert number to string with StrGet()

don't But I don't trust the algorithms in crypt32.dll, bcrypt.dll, msvcrt.dll to produce the same output on all Windows systems. I'd rather just write my own simple encryption, like just multiplying the string (which is a hash of my app's exe) by, say, my birthdate and then divide by some other num...
by pneumatic
24 Nov 2019, 14:16
Forum: Ask For Help
Topic: Convert number to string with StrGet()
Replies: 19
Views: 3247

Convert number to string with StrGet()

I'm trying to implement my own [very basic] encryption algorithm to perform mathematical operations on a string. My idea is to convert the string to a number first, then perform maths on that number, before converting it back to string. string1 := "string" string2 := NumGet(string1) ;convert string ...
by pneumatic
23 Nov 2019, 17:11
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 68
Views: 42986

Re: CNG (Cryptography API: Next Generation)

pneumatic , Every implementation of a given hash function (say, SHA256) must give the same hash, under any OS, under any circumstance. If it does not, the implementation is faulty. Yes, that does make sense. I guess one other worry I have is that different versions of that dll might use different f...

Go to advanced search