Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #66688 > unrolled thread
| Started by | khanta <khanta@gmail.com> |
|---|---|
| First post | 2014-02-19 07:42 -0500 |
| Last post | 2014-02-21 21:42 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
Win32 Write RAW Physical Disk Python 3.3.2 khanta <khanta@gmail.com> - 2014-02-19 07:42 -0500
Re: Win32 Write RAW Physical Disk Python 3.3.2 khanta@gmail.com - 2014-02-21 13:32 -0800
Re: Win32 Write RAW Physical Disk Python 3.3.2 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-21 21:42 +0000
| From | khanta <khanta@gmail.com> |
|---|---|
| Date | 2014-02-19 07:42 -0500 |
| Subject | Win32 Write RAW Physical Disk Python 3.3.2 |
| Message-ID | <mailman.7148.1392816628.18130.python-list@python.org> |
Hello,
I am trying to write to the raw physical disk on Windows 8.1 but I
get an error:
PermissionError: [Errno 13] Permission denied: '\\\\.\\PHYSICALDRIVE2\\\\'
OS: Windows 8.1
Python: 3.3.2
Drive is a USB drive
Running as administrator
Code Snippet:
with open(r"\\.\PHYSICALDRIVE2\\", "rb+") as f: #Writing Binary!
f.seek(unallocatedoffset + 0)
f.write(t1)
or
with open('\\\\.\\PHYSICALDRIVE2\\', "rb+") as f: #Writing Binary!
f.seek(unallocatedoffset + 0)
f.write(t1)
or
f = os.fdopen(os.open('\\\\.\\PHYSICALDRIVE2\\' os.O_CREAT |
os.O_WRONLY | os.O_APPEND | os.O_EXCL))
Any suggestions? Is it possible?
[toc] | [next] | [standalone]
| From | khanta@gmail.com |
|---|---|
| Date | 2014-02-21 13:32 -0800 |
| Message-ID | <064bf62f-0cca-4dfb-ac37-d1d9b9c9711e@googlegroups.com> |
| In reply to | #66688 |
Can anyone tell me if it is not possible? It would save me a lot of time.
Has anyone ever written to the raw disk on windows?
On Wednesday, February 19, 2014 7:42:02 AM UTC-5, khanta wrote:
> Hello,
>
> I am trying to write to the raw physical disk on Windows 8.1 but I
>
> get an error:
>
> PermissionError: [Errno 13] Permission denied: '\\\\.\\PHYSICALDRIVE2\\\\'
>
>
>
> OS: Windows 8.1
>
> Python: 3.3.2
>
> Drive is a USB drive
>
> Running as administrator
>
>
>
> Code Snippet:
>
>
>
> with open(r"\\.\PHYSICALDRIVE2\\", "rb+") as f: #Writing Binary!
>
> f.seek(unallocatedoffset + 0)
>
> f.write(t1)
>
>
>
>
>
> or
>
>
>
> with open('\\\\.\\PHYSICALDRIVE2\\', "rb+") as f: #Writing Binary!
>
> f.seek(unallocatedoffset + 0)
>
> f.write(t1)
>
>
>
> or
>
>
>
> f = os.fdopen(os.open('\\\\.\\PHYSICALDRIVE2\\' os.O_CREAT |
>
> os.O_WRONLY | os.O_APPEND | os.O_EXCL))
>
>
>
>
>
> Any suggestions? Is it possible?
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-02-21 21:42 +0000 |
| Message-ID | <mailman.7237.1393018952.18130.python-list@python.org> |
| In reply to | #66851 |
On 21/02/2014 21:32, khanta@gmail.com wrote: > Can anyone tell me if it is not possible? It would save me a lot of time. > Has anyone ever written to the raw disk on windows? > Sorry I can't help you, but you're more likely to get answers if you didn't top post and you use a decent email client or follow the instructions here https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing double line spacing. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web