回复下 IceCrack 的疑问,尽己所能吧
explorer,即 我的电脑 里的东西呢,不全是 文件系统/磁盘 上的文件,比如说 桌面、回收站 这类属于虚构的路径呢,死微软官方的说法叫 namespace,也就是比 文件系统(FS)还大的一个层次体系。举个例子吧,可以看看
开始菜单\程序\附件\通讯\网络连接.lnk 的属性:
%SystemRoot%\explorer.exe ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007acc7-3202-11d1-aad2-00805fc1270e}
上面的一串字符就叫CLSID,代表 namespace 的路径,翻译下,就是
explorer 我的电脑\控制面板\网络连接\
那么,回收站加密就运用了类似的一个CLSID:
{645FF040-5081-101B-9F08-00AA002F954E}
他在目标加密文件夹下生成了臭名昭著的desktop.ini,内容为
CLSID={645FF040-5081-101B-9F08-00AA002F954E}
然后加上 系统 隐藏属性
如果你去dir你的C: D: E: 下的recycler文件夹,也会发现一莫一样的desktop.ini
其实,新建一个文件夹,改名为:
a.{645FF040-5081-101B-9F08-00AA002F954E}
双击试试,是不是打开了回回收站?
再改成
b.{2227A280-3AEA-1069-A2DE-08002B30309D}
是不是打开了 打印机 文件夹呢?
类似的trick太多了,有兴趣的可以参看MSDN相关章节,包括 脚本 编写 shell 程序,都很有意思的。(我的MSDN是2003Feb的)
ms-help://MS.MSDNQTR.2003FEB.2052/shellcc/platform/shell/programmersguide/shell_intro.htm
再推荐一个好玩的东东,可以编辑系统的 namespace ,
shell object editor
http://www.crsky.com/soft/2206.html
最后,为什么在cmd下就能看呢?我的签名说:cmd只是一种shell,和explorer不同的Windows的shell,不受explorer特性的影响,所以能查看。
Last edited by electronixtar on 2006-8-19 at 00:23 ]
Reply to IceCrack's question, do your best.
Explorer, that is, the things in "My Computer", are not all files on the file system/disk. For example, things like the desktop and the recycle bin belong to fictional paths. The dead Microsoft official term is namespace, which is a hierarchical system that is larger than the file system (FS). Let's take an example. You can take a look at the properties of "
Start Menu\Programs\Accessories\Communications\Network Connections.lnk":
%SystemRoot%\explorer.exe::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007acc7-3202-11d1-aad2-00805fc1270e}
The string above is called CLSID, which represents the path of the namespace. Translated, it is
Explorer \ My Computer \ Control Panel \ Network Connections \
Then, the recycle bin encryption uses a similar CLSID:
{645FF040-5081-101B-9F08-00AA002F954E}
It generates the notorious desktop.ini in the target encrypted folder, with the content:
CLSID={645FF040-5081-101B-9F08-00AA002F954E}
Then add the system hidden attribute.
If you go to dir the recycler folder under C: D: E:, you will also find the exactly same desktop.ini.
In fact, create a new folder and rename it to:
a.{645FF040-5081-101B-9F08-00AA002F954E}
Double-click it. Does it open the recycle bin?
Then rename it to
b.{2227A280-3AEA-1069-A2DE-08002B30309D}
Does it open the Printers folder?
There are too many similar tricks. If you are interested, you can refer to the relevant chapters of MSDN, including script writing shell programs, which are very interesting. (My MSDN is from February 2003)
ms-help://MS.MSDNQTR.2003FEB.2052/shellcc/platform/shell/programmersguide/shell_intro.htm
Also recommend a fun thing. You can edit the system's namespace.
Shell Object Editor
http://www.crsky.com/soft/2206.html
Finally, why can you see it in cmd? My signature says: cmd is just a kind of shell, different from Explorer, the Windows shell. It is not affected by Explorer's characteristics, so you can view it.
Last edited by electronixtar on 2006-8-19 at 00:23 ]