Adr*_*lor 14 windows registry windows-8
对于Windows 8,用户可以选择为给定文档类型打开哪个应用程序
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\<extension>\UserChoice
Run Code Online (Sandbox Code Playgroud)
对于我机器上的PDF,它包含:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice]
"Hash"="xh8KhPWlZL0="
"ProgId"="AcroExch.Document"
Run Code Online (Sandbox Code Playgroud)
然而在另一台机器上,哈希是不同的.什么是哈希,有没有办法创建一个.reg文件,可以应用于另一台机器来设置这个首选项?
小智 14
Microsoft决定在Windows 8中(可能出于安全原因)用户应该只能通过内置GUI 设置默认程序.即按设计,您不应该能够在脚本中或以编程方式设置默认处理程序.
哈希值用于证明UserChoice ProgId值是由用户设置的,而不是通过任何其他方式设置的.只要Microsoft保留生成Hash的算法,以及使用Hash验证ProgId的机制,这就行了.
从理论上讲,你可以找出设置哈希(以及可能的其他隐藏的操作系统设置)的秘密,但你无法保证它的可靠性; 例如,下一个Windows Update可能会破坏您的方法.您可能只需要适应变化,并使用Microsoft内置于操作系统的新方法.
有人对哈希进行反向工程,并编写了CLI工具来设置文件关联:
extension = “.txt”; the file extension
sid = “S-1-5-21-463486358-3398762107-1964875780-1001” ; the SID of the current user
progid = “txtfile”; the ProgId of the desired association
regdate = “01d3442a29887400”; timestamp of the UserChoice registry key
experience = “a microsoft secret string”; a static string (this is a dummy example, not the real string
hash = Base64(MicrosoftHash(MD5(toLower(extension, sid, progid, regdate, experience))))
Run Code Online (Sandbox Code Playgroud)
并非所有细节都被揭示,但可能足以对其余部分进行反向工程。
| 归档时间: |
|
| 查看次数: |
10595 次 |
| 最近记录: |