Write a python program that creates hash signatures for


Assignment 1 -

Complete this assignment within your cloud 9 environment. Submit python files, written answers, and screenshots as a PDF file in the assignment submission.

Part 1 - Write a Python program that creates hash signatures for each file in your cloud 9 project directory. Hashes can be used to verify that a file has not been altered from its original or intended state. This is both a digital forensics technique as well as a general technique for monitoring any changes that may have been maliciously made to files on your web site. By capturing a signature / hash now it can be compared to hashes generated after an attack to determine what has been modified.

1. Reference your textbook for OS (import os) commands via the Python os library as well as the Python hashlib (import hashlib) library.

2. Traverses the files in your cloud 9 working directory and generate an md5 hash of each file. Make sure there are at least two files in your working directory.

3. Include a tab (\t) between the file name and hash value.

4. Each filename and hash must be on a separate line (\r). Be sure to hash the file contents not the file name.

5. Write each hash value to a new file named filehashes.txt.

Part 2 - Web Services and JSON Data

Is this part of your assignment you will write a Python program that utilizes the HTTP protocol, web services, and JSON data to search system vulnerability information.

1) Using a web browser go to the cvedetails website and search for vulnerabilities related to "internet information server", "apache", and "nginx". Review the information returned from your searches such as the CVE number, CVSS ranking, vulnerability type, publish date, and description. Provide a screenshot of your search results.

2) Using a web browser to review the JSON data retrieved.

3) Write a python program the presents the user with a 4 menu options a shown below. Items 1, 2, and 3 allow the user to search the CVE summary data returned by the 3 web services listed above. The 4th menu option allows the user to "quit". Your program must utilize the urllib and json Python libraries to obtain the data and then print the "id", "cvss", "published" and "summary" data if the summary data includes the search word entered by the user. The search must not be case sensitive. Entering the word "quit" must not be case sensitive.

Suggestions:

  • Import the urllib and json libraries.
  • Utilize a while loop to print the menu and prompt the user for input.
  • Above the while loop, create a function that implements a URL function parameter variable and a search term function parameter variable.
  • Within the function utilize urllib to obtain the data from the web service found at the specified URL.
  • Within the function use a for loop to iterate through the json data returned by the web
  • Inspect the summary element for matching words using the in operator and print the required data if a match of the search term is found within the summary data.

Assignment 2 -

Complete this assignment within your cloud 9 environment. Submit python files, written answers, and screenshots as necessary as a PDF file in the assignment submission.

1. Complete all TO DO items in the attached Assignment13Starter.py file. Complete the Python program that prompts the user to enter a password, hashes the password, and then compares the hashed password to the hashed password provided via the SQLite starter script. If the user entered, hashed password matches the hashed password found in the SQLite database, the program should display the message "The password is correct". Otherwise the program should display a message "password is incorrect" and prompt the user to enter another password. If the user enters an incorrect password the program should display a message "invalid user name".

2. Within cloud9 connect to you're the SQLite database "userdb.sqlite3" that was created in part 1 and issue the following SQL statements from the sqlite> command prompt. Within cloud9 enter the command sqlite3 userdb.sqlite3 to access your Users database.

  • Display a list of all tables in the userdb.sqlite3 database using the .tables command
  • Write a SELECT statement that displays all columns and rows in the Users table.
  • Write and execute an INSERT statement from the sqlite command line that creates / inserts a new user student2 and hashed password of EvenWeaker.

Hint: Don't use the "VALUES(?)" technique described in the book and used in your start script. Write the complete INSERT INTO statement with string values surrounded by single quotes in the VALUES clause.

Need to be basic and stick to instructions/concepts mentioned.?

Attachment:- Assignment Files.rar

Request for Solution File

Ask an Expert for Answer!!
Python Programming: Write a python program that creates hash signatures for
Reference No:- TGS02733247

Expected delivery within 24 Hours