Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am trying to write this python program out: The first partition entry is located at the address 1BE (hex). Print out the status byte
I am trying to write this python program out: The first partition entry is located at the address 1BE (hex). Print out the status byte (1 byte located at the starting address), the partition type (1 byte located at the address 1BE + 4) and the address of the first sector in the partition (1BE + 8). Below is my code. Did I write this out correctly?
import struct
mbr = bytearray()
with open("block.dd", "rb") as f:
mbr = f.read(2048)
status = mbr[0x1BE]
result = struct.unpack("
print(result)
result = mbr[0x1BE]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started