Create a Python module that reads Linux_syslog_ip_parser.py that reads syslog file and parses the IPV4 addresses and
Question:
Create a Python module that reads Linux_syslog_ip_parser.py that reads syslog file and parses the IPV4 addresses and stores the result into a csv file. Your module should contain the following functions:
a. linux_logfile_reader(filename) function that reads the syslog file and returns all IPV4 addresses
b. count_ipfrequency(ip_list) function that accepts the list of IPV4 addresses retuned by linux_logfile_reader function and returns a dictionary list with ip:frequency pair.
Write to_csv_file(ip_frequency) function that accepts a dictionary list containing ip:frequency pair returned from count_ipfrequeny function and stores the IpV4 addresses with its frequency value into a ‘ipv4.csv’ file.
i. Which internal IP address is the most frequency found in the ‘syslog’ file ( hint: internal ip addresses start with either 10, 172, or 192)
ii. Which external Ip address is the most frequently found in the ‘syslog’ file