Can python 'read disk sectors' like/via linux:dd ?
tauno.voipio at INVALIDiki.fi
Sun Nov 6 10:10:40 CET 2005
Pascal Bourguignon wrote:
> In unix, disks are files like any other file. So if your programming
> language allows you to read and write files, it allows you to read and
> write disks.
> Just write the equivalent of:
> int fd=open("/dev/hda",O_RDWR,0);
> close(fd); }
> and be sure to have the access rights on /dev/hda (and to know what
> you're doing!).
This means in practice that your program has to run
with root rights to handle complete disks or partitions.
Are you attempting to create a boot block virus?
tauno voipio (at) iki fi
More information about the Python-list