Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

(6 points) Write a python script that will copy a file (.txt) from one folder to another, and demonstrate a practical example of using a

(6 points) Write a python script that will copy a file (.txt) from one folder to another, and demonstrate a practical example of using a hash.

  1. Part 1: Write a script to copy a file from one directory to another. Use a SHA256 hash to confirm that the file copied cleanly into it's new location.

  2. Part 2: Expand your script with a command line argument that will scramble a single byte in the copied file. Demonstrate that the hashes are of the two files are now different.

  3. Some detailed requirements:

    1. Use argparse for argument parsing. Your argument should be named -scramble.

    2. Comment your code for full credit

    3. Your code should have help text and I should be able to understand it easily.

    4. Your code should work with native Python 3 libraries

    5. Do not change the file name when copying it.

    6. Please answer the question: Did changing a single byte in the file change the content of the file? Was the file still usable? Why or why not? Please answer as "Yes, always", "Sometimes", "No, never" and explain why.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students explore these related Databases questions