Situation: I am writing a python program to read through a hard disk (specifically Windows) and compare hex strings with each other.
Problem: Is it possible to do so? The solution I am looking for needs to be fast, therefore dd
is unsuitable.
I understand that on Linux systems we can do an open('/dev/sdX', 'r')
. I found another question that suggests that I use open('\\\\.\\PhysicalDriveX', 'r')
or open('\\\\.\\C:', 'r')
on "Win32-based applications".
Question: Does the above command work on normal Windows machines (64-bit) as well?
Additional information: I am using ePython, a variation of Python, with additional functionalities.
An alternate approach would be to stick with the Linux method using the built in Linux subsystem on Windows with:
Windows 10:
Bash-on-Ubuntu-on-Windows: https://msdn.microsoft.com/en-us/commandline/wsl/about
Winows 7:
Utilities and SDK for Subsystem for UNIX-based Applications in Microsoft Windows 7 and Windows Server 2008 R2 http://www.microsoft.com/en-us/download/details.aspx?id=2391
I've used the Windows 10 - Home Edition, Bash-on-Ubuntu-on-Windows at it works like a charm.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.