GlitchedPolygons / SigntoolGUI

Qt GUI that wraps signtool.exe with an easy drag & drop approach for signing binaries on Windows.
GNU General Public License v3.0
30 stars 3 forks source link

Add ability to sign VBS & PS1 files #1

Closed NoDowt closed 7 months ago

NoDowt commented 1 year ago

Would be good to add VBS & PS1 files to the supported formats for this tool.

I'm currently using another older front end "SignGUI" which allows me to do this, however came across your tool while seeing if there was anything more modern out there.

Cheers

GlitchedPolygons commented 1 year ago

Hi there, thanks for the input :)

Unfortunately, signtool.exe does not offer signing such files.

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/0b2a61b3-189a-4860-baf0-ad883cec595d/cant-sign-a-ps1-file-signtool-error-this-file-format-cannot-be-signed-because-it-is-not?forum=winserverpowershell

SigntoolGUI is meant as a direct UI wrapper around signtool.exe. Adding support for .PS1/.VBS files would require to abstract that behavior away and add substantial complexity to the program, that honestly I wouldn't enjoy very much, since my intention with this project is to keep it as clean and super-simple as possible.

I'm sure you understand. Of course, you are free to fork out and customize every bit out of it :)

NoDowt commented 1 year ago

@GlitchedPolygons Thanks for the prompt reply on this one. The current tool i'm using, SignGUI is also just a front end for Signtool.exe.

The link you have above actually says VBS files are handled by signtool natively; and can handle PS1 files on systems where powershell is also installed (signtool leverages the powershell signing provider).

Another example which indicates signtool can be used for ps1 files (and can corrupt it if file is edited incorrectly & re-signed using it) - https://learn.microsoft.com/en-us/troubleshoot/windows/win32/signtool-corrupts-powershell-script

I think it should just be a matter of adding vbs & ps1 to the valid files check & the rest will handle itself.

GlitchedPolygons commented 1 year ago

@NoDowt Thanks! In that case, I'll look into it đź‘Ť Sorry I did not read it thoroughly, I'm currently running short on time :)

Reopening...

NoDowt commented 1 year ago

@GlitchedPolygons hah I know the feeling. If I get some free time I might take a stab at it myself… I had a quick look & think I can see what to edit for the change… but I’ve got no experience when it comes to then compiling it all out…

GlitchedPolygons commented 7 months ago

@NoDowt Hey there, sorry for the slight delay (ehrm...) đź« 

I fixed this in release 1.1.0 - in case you even need this anymore ;D

https://github.com/GlitchedPolygons/SigntoolGUI/releases/tag/1.1.0