Question: Program is done in Python 3.1 Attached is a CSV file that contains rows of data describing the attack information from a particular IP address.

Program is done in Python 3.1

Attached is a CSV file that contains rows of data describing the attack information from a particular IP address. The first column is the IP address, the second the country of origin, the third the number of attack attempts and the fourth represents the number of unique user names used in the attacks. For example, IP address 222.234.0.57 is in the Republic of Korea and attempted to log in 599 times using 580 invalid user names. Apparently some of the user names were used more than once.

Your objective is to open the file, read it line by line, split the data into individual variables and assign it to three different dictionaries. The key for each dictionary is the IP address. Each dictionary contains different values that can be associated with the key (IP). For example, use the IP to look up the coutry of origin in one dictionary, the number of attacks in another and the number of unique user names in the third dictionary. Provide a menu that allows the user to select what it is they would like to do. They can:

Find the number of attacks associated with an IP address Find the country of origin for an IP Find the number of different invalid user names tried Quit

For any of the choices (except Quit), the user enters the IP address. If the address does not match any in the data, simply display a message that there is no record of an attack attempt from that IP.

cv file is an excel file with Ip addresses

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!