Search found 338 matches
- 27 Nov 2019, 20:29
- Forum: Ask for Help (v1)
- Topic: AHK Script Encryption Topic is solved
- Replies: 50
- Views: 19602
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 ...
- 27 Nov 2019, 16:26
- Forum: Ask for Help (v1)
- Topic: AHK Script Encryption Topic is solved
- Replies: 50
- Views: 19602
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...
- 26 Nov 2019, 22:55
- Forum: Ask for Help (v1)
- Topic: AHK Script Encryption Topic is solved
- Replies: 50
- Views: 19602
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...
- 25 Nov 2019, 15:56
- Forum: Scripts and Functions (v1)
- Topic: CNG (Cryptography API: Next Generation)
- Replies: 101
- Views: 65005
- 25 Nov 2019, 15:44
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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'...
- 24 Nov 2019, 22:17
- Forum: Ask for Help (v1)
- Topic: Convert >19 digit number to string Topic is solved
- Replies: 3
- Views: 488
Re: Convert >19 digit number to string Topic is solved
Aha, this one works
Code: Select all
If ("" . string1 = "" . string2)
msgbox true
- 24 Nov 2019, 22:06
- Forum: Ask for Help (v1)
- Topic: Convert >19 digit number to string Topic is solved
- Replies: 3
- Views: 488
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 :=...
- 24 Nov 2019, 21:07
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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...
- 24 Nov 2019, 19:52
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
- 24 Nov 2019, 19:37
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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...
- 24 Nov 2019, 18:00
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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...
- 24 Nov 2019, 16:56
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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.
- 24 Nov 2019, 16:39
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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" )
Similar thing with MsgBox, % Format( "{1:i}" , "3bea1dd4dec09f279d24ccea3c138735" )
- 24 Nov 2019, 15:33
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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...
- 24 Nov 2019, 15:13
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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.
But I'm still curious to know if there is a way to convert a var's binary data to a string.
- 24 Nov 2019, 15:01
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
Re: Convert number to string with StrGet()
But I want to convert its binary data back to Unicode characters.Chunjee wrote: ↑24 Nov 2019, 14:47I always just append the number to a blank string:Code: Select all
number := 8 str := "" number msgbox, % str ; => "8"
I think this does the same as your example
Code: Select all
string := Format( "{1:s}" , 123)
msgbox % string
- 24 Nov 2019, 14:52
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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...
- 24 Nov 2019, 14:16
- Forum: Ask for Help (v1)
- Topic: Convert number to string with StrGet()
- Replies: 19
- Views: 14770
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 ...
- 23 Nov 2019, 17:11
- Forum: Scripts and Functions (v1)
- Topic: CNG (Cryptography API: Next Generation)
- Replies: 101
- Views: 65005
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...
- 23 Nov 2019, 10:30
- Forum: Scripts and Functions (v1)
- Topic: CNG (Cryptography API: Next Generation)
- Replies: 101
- Views: 65005
Re: CNG (Cryptography API: Next Generation)
Since the library uses advapi32.dll to generate hashes, I am worried that maybe different Windows systems will have different versions of advapi32.dll in their System32 folder, which might use slightly different implementation, causing a different hash to be generated, which would break my entire ap...