Write a Python program that creates hash signatures

Assignment Help Python Programming
Reference no: EM131937775

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

Reference no: EM131937775

Questions Cloud

What direction do you feel nigeria should take in the future : How have the frequent shifts from civilian to military rule and back again exacerbated. What direction do you feel Nigeria should take in the future? Explain.
Openness and economic development : Explain in up to 200 words the relationship between Openness and economic development by calculating the correlation coefficient between GDP per
Relationship in cause analysis and requirements definition : What is the relationship between a cause analysis and a requirements definition (often a document)? How does one impact the other?
Employee health insurance : What factors would go into your thought process for budgeting for the following expense line item - Employee Health Insurance?
Write a Python program that creates hash signatures : Write a Python program that creates hash signatures for each file in your cloud 9 project directory, write a Python program that utilizes the HTTP protocol
Discuss the ways in which mr gazitua could take advantage : Identify at least four specific terms from the chapters/notes that Mr. Gazitua mentioned in the video. In your own words, briefly explain what each term means.
Conduct a phone or personal interview with past manager : Conduct a phone or personal interview with a current or past manager. Ask this person to describe the role that training plays in the company.
Preferred brand of instant noodles outside supermarket : When asked about their preferred brand of instant noodles outside a supermarket setting, customers could not remember Nissin's name,
Exponential exhaustion index : What are the limitations of using measures of physical scarcity such as the "exponential exhaustion index" that was developed

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd