Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions