Skip to content

Instantly share code, notes, and snippets.

@lifeeth
Created March 1, 2011 12:59
Show Gist options
  • Save lifeeth/849083 to your computer and use it in GitHub Desktop.
Save lifeeth/849083 to your computer and use it in GitHub Desktop.
possible_drives = [
r"\\.\PhysicalDrive1", # Windows
r"\\.\PhysicalDrive2",
r"\\.\PhysicalDrive3",
"/dev/mmcblk0", # Linux - MMC
"/dev/mmcblk1",
"/dev/mmcblk2",
"/dev/sdb", # Linux - Disk
"/dev/sdc",
"/dev/sdd",
"/dev/disk1", #MacOSX
"/dev/disk2",
"/dev/disk3",
]
sector_size = 512
for drive in possible_drives:
try:
disk = file(drive,'rb')
disk.seek(14000*sector_size)
if "MOMS" in disk.read(7):
print "MOMS disk found at " + drive
break
except:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment