我可以对JScript(.js)或VBScript(.vbs)文件进行数字签名吗? [英] Can I digitally sign JScript (.js) or VBScript (.vbs) files?

查看:165
本文介绍了我可以对JScript(.js)或VBScript(.vbs)文件进行数字签名吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道人们可以使用 signtool 。因此,一直以来,我一直以为无法对 Windows脚本宿主解释的任何文件进行签名,例如JScript(.js)或VBScript(.vbs),因为仅仅是文本文件。

I know that one can sign a Windows binary executable file using signtool. So all this time I was under assumption that one cannot sign any of the files interpreted by Windows Script Host, such as JScript (.js) or VBScript (.vbs) because those are mere text files.

但是今天,打开我从网站上下载的 .js 文件时,我收到了以下警告:

But today, while opening a .js file that I downloaded off my web site, I was greeted by this warning:

< img src = https://i.stack.imgur.com/wUBso.png alt =在此处输入图片描述>

这意味着有一种方法可以对这些 .js / .vbs 文件进行签名吗?如果是这样,那怎么办呢?

So does this mean that there's a way to sign those .js/.vbs files? If so, then how?

推荐答案

只需完成我的原始问题即可。答案是。据我所知,可以使用Microsoft的 SignTool

Just to finalize my original question. The answer is yes. To the best of my knowledge, one can sign the following files using Microsoft's SignTool:


  • 显然是Windows可执行文件: .exe .dll .com (对于旧的DOS格式),。 scr (用于屏幕保护程序), .ocx (用于ActiveX控件), .cpl (用于控制面板可执行文件。)

  • Obviously Windows executables: .exe, .dll, .com (for old DOS format), .scr (for screensaver), .ocx (for ActiveX control), .cpl (for Control Panel executable.)

Windows安装程序文件: .msi .msp

Windows installer files: .msi, .msp

基于文本的脚本: .js (对于JScript ), .vbs (对于VBScript), .jse (对于已编码的JScript),。 vbe (用于编码的VBScript)

Text-based scripts: .js (for JScript), .vbs (for VBScript), .jse (for encoded JScript), .vbe (for encoded VBScript)

PowerShell脚本: .ps1 .psm1 .ps1xml

PowerShell scripts: .ps1 , .psm1, .ps1xml

< a href = https://en.wikipedia.org/wiki/Windows_Script_File rel = nofollow noreferrer> Windows脚本文件: .wsf (带有混合的内容)

Windows Script Files: .wsf (with mixed content)

这篇关于我可以对JScript(.js)或VBScript(.vbs)文件进行数字签名吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆