Added argue stuff. Renamed script to Driv3rs.py (Better Name)
This commit is contained in:
parent
fcd45f53bb
commit
e4f7a3ee3a
|
@ -1,5 +1,13 @@
|
||||||
from struct import unpack
|
from struct import unpack; from sys import argv
|
||||||
import os
|
|
||||||
|
args = argv
|
||||||
|
usage = "\nUsage: python Driv3rs.py [input_file] [output_file]\n"
|
||||||
|
|
||||||
|
if len(args) < 3:
|
||||||
|
print usage
|
||||||
|
exit()
|
||||||
|
disk_img = args[1]
|
||||||
|
output_file = args[2]
|
||||||
|
|
||||||
def readUnpack(bytes, **options):
|
def readUnpack(bytes, **options):
|
||||||
if options.get("type") == 't':
|
if options.get("type") == 't':
|
||||||
|
@ -39,9 +47,7 @@ dev_types ={273: 'Character Device, Write-Only, Formatter',
|
||||||
|
|
||||||
mfgs = {17491: 'David Schmidt'} # dictionary for manufacturers
|
mfgs = {17491: 'David Schmidt'} # dictionary for manufacturers
|
||||||
|
|
||||||
print("\033c"); # clear screen
|
SOSfile = open(disk_img, 'rb') # open file to interrogate
|
||||||
|
|
||||||
SOSfile = open('SOSCFFA.DRIVER', 'rb') # open file to interrogate
|
|
||||||
filetype = readUnpack(8, type = 't') # read first eight bytes and stick returned text into filetype
|
filetype = readUnpack(8, type = 't') # read first eight bytes and stick returned text into filetype
|
||||||
|
|
||||||
if filetype == 'SOS DRVR': # is filetype 'SOS DRVR'??
|
if filetype == 'SOS DRVR': # is filetype 'SOS DRVR'??
|
Loading…
Reference in New Issue