如何在windows下打开磁盘并低级读取数据?
我知道在 Linux 中它就像 /dev/sda 一样简单,但是在 Windows 中如何打开磁盘并开始在低级别读取数据?
在 python 中,我尝试过:
f = open("K:", "r")
并且收到此错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 13] Permission denied: 'K:'
即使作为管理员,我也会收到此错误。
I know in linux it is as simple as /dev/sda but in Windows how do you open a disk and start reading data at the low level?
In python I've tried:
f = open("K:", "r")
and I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 13] Permission denied: 'K:'
I get this error even as administrator.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
来自 http://support.microsoft.com /kb/100027
From http://support.microsoft.com/kb/100027
请记住,Windows 和其他操作系统中的所有对象都是文件。要从驱动器 E 打开并读取 16 字节数据:使用以下代码:
Remember that all objects in windows and other operating systems are files. To open and read 16 bytes of data from drive E: use the code below:
两者都为我工作。要访问 C 分区或整个驱动器,需要管理员权限。这是一个替代 open() 的示例:
Both worked for me. To gain access to Partition C: or the whole drive, administrator privileges are needed. Here an example as replacement for open():
这在 Windows 10 上对我不起作用,实际上自 Windows 7 以来就不再对我起作用,而它在 Windows XP 下确实有效。
我正在运行
CMD.EXE
“以管理员身份”,我的用户帐户似乎是管理员组的成员,并且我不知道我还可以做些什么来让自己能够执行此操作。我不明白怎么会有这么多人声称可以如此随意地做到这一点。This doesn't work for me on Windows 10, and indeed hasn't worked for me since Windows 7, whereas it DID work under Windows XP.
I am running
CMD.EXE
"As Administrator," my user account appears to be a member of the Administrators group, and I have no idea what else I could possibly do to give myself the ability to do this. I don't understand how so many people claim to be able to do it so casually.