From e4f7a3ee3a293e13fc2ae6831f1aefb8a6d01959 Mon Sep 17 00:00:00 2001 From: ultramagnus_tcv Date: Thu, 26 Nov 2015 17:42:52 -0600 Subject: [PATCH] Added argue stuff. Renamed script to Driv3rs.py (Better Name) --- 3Slurp.py => Driv3rs.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) rename 3Slurp.py => Driv3rs.py (97%) diff --git a/3Slurp.py b/Driv3rs.py similarity index 97% rename from 3Slurp.py rename to Driv3rs.py index 43e3bec..e085013 100644 --- a/3Slurp.py +++ b/Driv3rs.py @@ -1,5 +1,13 @@ -from struct import unpack -import os +from struct import unpack; from sys import argv + +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): if options.get("type") == 't': @@ -39,9 +47,7 @@ dev_types ={273: 'Character Device, Write-Only, Formatter', mfgs = {17491: 'David Schmidt'} # dictionary for manufacturers -print("\033c"); # clear screen - -SOSfile = open('SOSCFFA.DRIVER', 'rb') # open file to interrogate +SOSfile = open(disk_img, 'rb') # open file to interrogate filetype = readUnpack(8, type = 't') # read first eight bytes and stick returned text into filetype if filetype == 'SOS DRVR': # is filetype 'SOS DRVR'??