Search found 28 matches

by TheHacker
24 Apr 2020, 15:24
Forum: Scripts and Functions
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 99
Views: 41943

Re: RunAsTask() - Auto-elevates script without UAC prompt

So I should be fine if I modify line 59 as follows:

Code: Select all

      <Command>""" ( A_IsCompiled ? A_ScriptFullpath : SubStr(A_AhkPath, 1, InStr(A_AhkPath, "\", , -1)) . "AutoHotkeyU64.exe" ) """</Command>
Any idea why it does not work with the UIA version?
by TheHacker
24 Apr 2020, 14:39
Forum: Scripts and Functions
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 99
Views: 41943

Re: RunAsTask() - Auto-elevates script without UAC prompt

With some further testing I found out that using AutoHotkeyU64_UIA.exe (AutoHotkey.exe is a copy of this file) is the problem. If I use AutoHotkeyU64.exe instead it works just fine.
by TheHacker
24 Apr 2020, 13:56
Forum: Scripts and Functions
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 99
Views: 41943

Re: RunAsTask() - Auto-elevates script without UAC prompt

Okay does the quotes now appear around the path? Yes, they do. I added them manually before I deleted all the old entries just for a test and it didn't work either. Here is the current .xml: <?xml version="1.0" encoding="UTF-16"?> <Task version="1.6" xmlns="http://schemas.microsoft.com/windows/2004...
by TheHacker
24 Apr 2020, 13:19
Forum: Scripts and Functions
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 99
Views: 41943

Re: RunAsTask() - Auto-elevates script without UAC prompt

Code fixed. Many thanks for your wonderful cooperation. :thumbup: Thank you. I have deleted all the Task Scheduler entries and replaced the function code, however, the same problem persists. Works the first time but the second time only the H icon shows up for a moment. If there was a problem in th...
by TheHacker
24 Apr 2020, 12:14
Forum: Scripts and Functions
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 99
Views: 41943

Re: RunAsTask() - Auto-elevates script without UAC prompt

Sure, here you are: <?xml version="1.0" encoding="UTF-16"?> <Task version="1.6" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> <RegistrationInfo> <URI>\[RunAsTask] test.ahk @2836152222</URI> </RegistrationInfo> <Triggers /> <Principals> <Principal id="Author"> <UserId>*edited out by ...
by TheHacker
23 Apr 2020, 17:29
Forum: Scripts and Functions
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 99
Views: 41943

Re: RunAsTask() - Auto-elevates script without UAC prompt

Does the full path to test.ahk have any space(s) in in it? If yes, move test.ahk to root folder or any folder path that doesn't have spaces and try again. Nope, it does not. c:\test\test.ahk and the behavior is the same. First run works, consecutive runs show the icon for a split-second, then termi...
by TheHacker
19 Apr 2020, 06:04
Forum: Scripts and Functions
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 99
Views: 41943

Re: RunAsTask() - Auto-elevates script without UAC prompt

How are you launching the script for the consecutive calls? Simply clicking on test.ahk in Explorer. The "H" icon appears in the tray for a split-second and disappears again. #Persistent does not help. RunAsTask() is defined in %A_MyDocuments%\AutoHotkey\Lib\RunAsTask.ahk. Thank you. EDIT: I though...
by TheHacker
18 Apr 2020, 20:45
Forum: Scripts and Functions
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 99
Views: 41943

Re: RunAsTask() - Auto-elevates script without UAC prompt

Hi, Windows 10 x64 v1809 AHK 1.1.32.0 x64 I tried a simple hotkey script: RunAsTask() F9::MsgBox The first run after UAC confirmation works fine, the scheduler task is created, but any subsequent run does not work, the script exits immediately and the hotkey is not registered. Is this supposed to no...
by TheHacker
23 Nov 2019, 15:33
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

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.
by TheHacker
07 Oct 2019, 15:21
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

DRocks,
There are two separate functions of the class. One function is hashing (not used for encryption) and the other function is encryption (used for encryption).
by TheHacker
06 Oct 2019, 15:39
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

DRocks,
By definition, you cannot get the original string back from a hash. That's exactly what a hash is supposed to do - make it impossible to get the original data.
by TheHacker
22 Feb 2019, 07:27
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

I actually wanted to ask a similar question to pneumatic's - if I want the same string (plaintext) encrypted using the same password to result in a different ciphertext each time, should I change the IV each time or should I salt the string each time (using some random salt)?

Thank you.
by TheHacker
20 Feb 2019, 14:26
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

Will try, thank you!
by TheHacker
12 Feb 2019, 05:18
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

Thank you very much for having looked into the bug! I will use the Windows 7 functions, then.
Any suggestions on how to create a hash of a part of a binary file, please?

Thank you.
by TheHacker
27 Sep 2018, 07:35
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

The Windows 10 versions of the file hash functions give incorrect results if the file size is 262145 bytes or larger. Just to give an example to anyone who'd like to confirm / reproduce: #Include class_bcrypt.ahk #Include bcrypt_sha256_file.ahk SetWorkingDir, %A_ScriptDir% Loop, 262145 TestString ....
by TheHacker
18 Feb 2018, 20:31
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

OK, no luck. Sometimes it works, sometimes it does not. Don't know how to pinpoint it.
by TheHacker
17 Feb 2018, 19:21
Forum: Ask For Help
Topic: Totalcommander - Access Selection without Clipboard - Listboxtitle Topic is solved
Replies: 9
Views: 1916

Re: Totalcommander - Access Selection without Clipboard - Listboxtitle Topic is solved

Code: Select all

SendMessage, 1074, 17, , , ahk_class TTOTAL_CMD
WinGetText, PathInTC, ahk_id %ErrorLevel%
StringTrimRight, PathInTC, PathInTC, 3
by TheHacker
17 Feb 2018, 15:45
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

Thanks for bringing me on the right track. It seems replacing VarSetCapacity(pbInput, StrPut(string, "UTF-8"), 0) && cbInput := StrPut(string, &pbInput, "UTF-8") - 1 with VarSetCapacity(pbInput, StrPut(string, "CP0"), 0) && cbInput := StrPut(string, &pbInput, "CP0") - 1 helps. Need to do some testin...
by TheHacker
17 Feb 2018, 12:46
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

Hi again, AHK 1.1.28.00 x64 Unicode, Windows 10 x64 v.1709, CNG Win7 version. I would like to create a hash of a part of a binary file. However, if said part contains characters (bytes) >= 0x80 I get incorrect results. File := FileOpen("TestFile", "rw") File.WriteUChar(0x80) File.Seek(0) File.RawRea...
by TheHacker
17 Feb 2018, 12:08
Forum: Scripts and Functions
Topic: CNG (Cryptography API: Next Generation)
Replies: 69
Views: 43358

Re: CNG (Cryptography API: Next Generation)

Hi, AHK 1.1.28.00 x64 Unicode, Windows 10 x64 v.1709. The Windows 10 versions of the file hash functions give incorrect results if the file size is 262145 bytes or larger. The Windows 7 versions of the file hash functions seem to give correct results regardless of file size. Tested for MD5, SHA1, SH...

Go to advanced search