Task 4: Examine floppy.img Mount floppy.img at a suitable mountpoint inside your VM. Look inside the mountpoint directory. You should see a number of files in the top-level directory. Look inside your answers2.json at the strings labelled contentA and contentB. Exactly one of those two strings appears as the content of a file in the floppy disk's filesystem. I.e., there is a file that contains contentA or a file that contains contentB but not both. Additionally, the other string has been written into unused space of the floppy disk, so the data is in floppy.img but cannot be seen inside any of the files at the mountpoint. However it can be seen in a hexdump of floppy.img. I.e., if there is a file that contains contentA then contentB has been written into unused space. You must search through your mountpoint directory to find out which of contentA and contentB is stored in a file of the filesystem and which is stored in unused space. Suppose that contentA is stored in a file, and contentB is stored in unused space. If yours is the other way around, reverse the names in the remainder of this task description. Now unmount the filesystem and use a hex editor on floppy.img to change the content of the file holding contentA without changing the timestamps. You must change the first letters of the string in the file named contentA to be your first name. Be careful to overwrite bytes, not insert bytes. You must not change the timestamps. Save your changes to floppy.img. You can check that the changes have been applied by mounting floppy.img again and looking at the file contents. Next, use a hexdump program (or a hex editor) to find contentB on disk and write down the range offsets (in hexadecimal) of the bytes holding contentB. Enter your ranges in answers2.json as the answer for question2. To receive points your answer must be in a comma-separated list of hexadecimal ranges and must be inclusive with the last byte, e.g., 0x10-0x1f, 0x30-04b. Finally, compress your floppy disk image using gzip: $ gzip floppy, img
Task 4: Examine floppy.img Mount floppy.img at a suitable mountpoint inside your VM. Look inside the mountpoint directory. You should see a number of files in the top-level directory. Look inside your answers2.json at the strings labelled contentA and contentB. Exactly one of those two strings appears as the content of a file in the floppy disk's filesystem. I.e., there is a file that contains contentA or a file that contains contentB but not both. Additionally, the other string has been written into unused space of the floppy disk, so the data is in floppy.img but cannot be seen inside any of the files at the mountpoint. However it can be seen in a hexdump of floppy.img. I.e., if there is a file that contains contentA then contentB has been written into unused space. You must search through your mountpoint directory to find out which of contentA and contentB is stored in a file of the filesystem and which is stored in unused space. Suppose that contentA is stored in a file, and contentB is stored in unused space. If yours is the other way around, reverse the names in the remainder of this task description. Now unmount the filesystem and use a hex editor on floppy.img to change the content of the file holding contentA without changing the timestamps. You must change the first letters of the string in the file named contentA to be your first name. Be careful to overwrite bytes, not insert bytes. You must not change the timestamps. Save your changes to floppy.img. You can check that the changes have been applied by mounting floppy.img again and looking at the file contents. Next, use a hexdump program (or a hex editor) to find contentB on disk and write down the range offsets (in hexadecimal) of the bytes holding contentB. Enter your ranges in answers2.json as the answer for question2. To receive points your answer must be in a comma-separated list of hexadecimal ranges and must be inclusive with the last byte, e.g., 0x10-0x1f, 0x30-04b. Finally, compress your floppy disk image using gzip: $ gzip floppy, img
Chapter13: File Input And Output
Section: Chapter Questions
Problem 6PE
Related questions
Question

Transcribed Image Text:Task 4: Examine floppy.img
Mount floppy.img at a suitable mountpoint inside your VM.
Look inside the mountpoint directory. You should see a number of files in the top-level directory.
Look inside your answers2.json at the strings labelled contentA and contentB. Exactly one of those two strings
appears as the content of a file in the floppy disk's filesystem. I.e., there is a file that contains contentA or a file
that contains contentB but not both.
Additionally, the other string has been written into unused space of the floppy disk, so the data is in floppy.img
but cannot be seen inside any of the files at the mountpoint. However it can be seen in a hexdump of floppy.img.
I.e., if there is a file that contains contentA then contentB has been written into unused space.
You must search through your mountpoint directory to find out which of contentA and contentB is stored in a file
of the filesystem and which is stored in unused space. Suppose that contentA is stored in a file, and contentB is
stored in unused space. If yours is the other way around, reverse the names in the remainder of this task
description.
Now unmount the filesystem and use a hex editor on floppy.img to change the content of the file holding
contentA without changing the timestamps. You must change the first letters of the string in the file named
contentA to be your first name. Be careful to overwrite bytes, not insert bytes. You must not change the
timestamps. Save your changes to floppy.img. You can check that the changes have been applied by mounting
floppy.img again and looking at the file contents.
Next, use a hexdump program (or a hex editor) to find contentB on disk and write down the range offsets (in
hexadecimal) of the bytes holding contentB. Enter your ranges in answers2.json as the answer for question2. To
receive points your answer must be in a comma-separated list of hexadecimal ranges and must be inclusive with
the last byte, e.g., 0x10-0x1f, 0x30-04b.
Finally, compress your floppy disk image using gzip:
$ gzip floppy, img
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L

Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning