Question: As an intern at Cisco your manager has asked you to create a script that can quickly sort through a data log, parse it for

As an intern at Cisco your manager has asked you to create a script that can quickly sort through a data log, parse it for relevant information, and output the sanitized results to another text file. The text file has two columns: the datetime at which a router was accessed, and the IPv6 address from where the connection was requested, separated by a | (pipe character) The new standard for Internet Protocol, IPv6, uses IP addresses with 8 sets of 64-bit numbers. The data file your manager has asked you to clean includes up an unknown number data points with a combination of any of the following four IPv6 formats Uppercase Hexadecimal Lowercase Hexadecimal Long Form2018:0000:AC10:0000:0001:0000: 2018:0000:ac10:0000:0001:0000:1111 1111:0BD2 Obd2 Short F orm 2018: A C10:1:1111 BD2 2018::ac10:1:1111:bd2 In "short form" notation, all leading zeros are removed from each block, and any block of only zeroes is removed. In "long form" notation, all zeros are present Write a script HW11_login.py that takes a filename as input from the user, and outputs the file output.txt with all of the IPv6 addresses in Lowercase Short Form notation. Sample input 20080962T163100+0501 20030135T274900+0607 20100521T015800+0870 2009017 6T126700+0110 | FE80:0000: 0001:0003: 0202:B3FF: FE1E: 8329 2001:db8: 23: 601: 909:20:1a:0000 2001: DB8 : 85A3: 8D3:1319:8A2E: 370:7348 | | fe80::1ff: fe23:4567 :890a: 321:20fa Sample output fe80::1:3:202:b3ff: fele: 8329 2001: db8:23:601:909: 20:1a 2001: db8:85a3: 8d3:1319:8a2e:370:7348 fe80::1ff: fe23:4567:890a: 321:20fa As an intern at Cisco your manager has asked you to create a script that can quickly sort through a data log, parse it for relevant information, and output the sanitized results to another text file. The text file has two columns: the datetime at which a router was accessed, and the IPv6 address from where the connection was requested, separated by a | (pipe character) The new standard for Internet Protocol, IPv6, uses IP addresses with 8 sets of 64-bit numbers. The data file your manager has asked you to clean includes up an unknown number data points with a combination of any of the following four IPv6 formats Uppercase Hexadecimal Lowercase Hexadecimal Long Form2018:0000:AC10:0000:0001:0000: 2018:0000:ac10:0000:0001:0000:1111 1111:0BD2 Obd2 Short F orm 2018: A C10:1:1111 BD2 2018::ac10:1:1111:bd2 In "short form" notation, all leading zeros are removed from each block, and any block of only zeroes is removed. In "long form" notation, all zeros are present Write a script HW11_login.py that takes a filename as input from the user, and outputs the file output.txt with all of the IPv6 addresses in Lowercase Short Form notation. Sample input 20080962T163100+0501 20030135T274900+0607 20100521T015800+0870 2009017 6T126700+0110 | FE80:0000: 0001:0003: 0202:B3FF: FE1E: 8329 2001:db8: 23: 601: 909:20:1a:0000 2001: DB8 : 85A3: 8D3:1319:8A2E: 370:7348 | | fe80::1ff: fe23:4567 :890a: 321:20fa Sample output fe80::1:3:202:b3ff: fele: 8329 2001: db8:23:601:909: 20:1a 2001: db8:85a3: 8d3:1319:8a2e:370:7348 fe80::1ff: fe23:4567:890a: 321:20fa
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
