Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A common practice in programming is writing code to search through and extract data in file. For this we are going to extract data from

A common practice in programming is writing code to search through and extract data in file. For this we are going to extract data from an error log file.
Create a new project in PyCharm titled: YOURAME-Assignment3
Insert the error_log.txt file into your PyCharm project to use.
From the error log file, use Python regular expressions to extract the IP addresses. Then use Python to write the IP addresses to a text file. The addresses should be listed in a
column.
Your submission MUST include this file:
main.py - must have main function in it. Failure to include main function in your submission will result in 0.[Sun Mar 716:02:002004][notice] Apache/1.3.29(Unix) configured -- resuming normal operations
[Sun Mar 716:02:002004][info] Server built: Feb 27200413:56:37
[Sun Mar 716:02:002004][notice] Accept mutex: sysvsem (Default: sysvsem)
[Sun Mar 716:05:492004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 716:45:562004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 717:13:502004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 717:21:442004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 717:23:532004] statistics: Use of uninitialized value in concatenation (.) or string at /home/httpd/twiki/lib/TWiki.pm line 528.
[Sun Mar 717:23:532004] statistics: Can't create file /home/httpd/twiki/data/Main/WebStatistics.txt - Permission denied
[Sun Mar 717:27:372004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 717:31:392004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 717:58:002004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 718:00:092004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 718:10:092004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 718:19:012004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 718:42:292004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 718:52:302004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 718:58:522004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 719:03:582004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 719:08:552004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 719:22:112004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 719:31:252004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 719:39:402004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 719:41:332004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 719:42:452004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 720:02:132004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 720:04:352004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 720:11:332004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 720:12:552004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 720:25:312004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 720:44:482004][info][client 64.242.88.10](104)Connection reset by peer: client stopped connection before send body completed
[Sun Mar 720:58:272004][info][client 64.242.88.10](104)Connection reset by peer: clien
image text in transcribed

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

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

Determine whether the algebraic equation is linear. 6x 2 y = 5

Answered: 1 week ago

Question

Write formal proposal requests.

Answered: 1 week ago

Question

Write an effective news release.

Answered: 1 week ago

Question

Identify the different types of proposals.

Answered: 1 week ago