Question: It is your task to write code to interface with the user and the module, simple _tripwire, that contalins the functions to perform the Integrity
It is your task to write code to interface with the user and the module, simple _tripwire, that contalins the functions to perform the Integrity checks on the fles. You can obtain the fle on ranger by dolng the following: rangeres cp SPUB/s1mple.tripwire.py Essentially, you are writing the glue to allow users to have a functioning application. To interface with the integrity checker, you will need to import the appropriate module: import simple.tripwire This module contains three functions: 1. populate_list(path): This function takes a single argument, which is a string and represents the path to a directory containing the files to be checked. It will then populate internal data structures about the files in that path. This must be called in order for the following functions to work property It does not return a value. 2. generate hashes): This function does not take an argument. It will generate hashes for each fle contained in the path the user provided and store them in a file that will be written to disk. The file is called 'known good pk. It does not return a value 3. check hashes) This function does not take an argument It will perform the integrity checks on all fles within the path provided by the user. It does not return a value To interface with the user, you will ask the ser to input what task they want the integrity checker to accomplish, which is to either (1) generate hashes of known good files or (2) check the state of fles, and then ask the user to input the path to the fles A sample run of the program should look like the following: ranger8s python3 integrity.py What would you like to do? (G)enerate hashes or (C)heck the state of files? G Enter the path: /bin ader It is your task to write code to interface with the user and the module, simple _tripwire, that contalins the functions to perform the Integrity checks on the fles. You can obtain the fle on ranger by dolng the following: rangeres cp SPUB/s1mple.tripwire.py Essentially, you are writing the glue to allow users to have a functioning application. To interface with the integrity checker, you will need to import the appropriate module: import simple.tripwire This module contains three functions: 1. populate_list(path): This function takes a single argument, which is a string and represents the path to a directory containing the files to be checked. It will then populate internal data structures about the files in that path. This must be called in order for the following functions to work property It does not return a value. 2. generate hashes): This function does not take an argument. It will generate hashes for each fle contained in the path the user provided and store them in a file that will be written to disk. The file is called 'known good pk. It does not return a value 3. check hashes) This function does not take an argument It will perform the integrity checks on all fles within the path provided by the user. It does not return a value To interface with the user, you will ask the ser to input what task they want the integrity checker to accomplish, which is to either (1) generate hashes of known good files or (2) check the state of fles, and then ask the user to input the path to the fles A sample run of the program should look like the following: ranger8s python3 integrity.py What would you like to do? (G)enerate hashes or (C)heck the state of files? G Enter the path: /bin ader
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
