Home > other >  Help bosses Perl
Help bosses Perl

Time:09-21


1. Here's a sample of a webserver log file:
173.81.109.238 - [16/Feb/2020:08:25:22-0500] "GET/cs336/notes/chapter3 336-4. PDF
HTTP/1.1 "200 5096" http://ferrar.wvstateu.edu/cs336/336class.html "" Mozilla/5.0 (Windows
NT 10.0; Win64. X64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130
Safari/537.36 "
66.102.7.17 - [16/Feb/2020:09:14:15-0500] "GET/cs336/336 index. HTTP/1.1 HTML" 200 586
"-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
537.36 Google Chrome/49.0.2623.75 Safari/Favicon
"66.102.7.15 - [16/Feb/2020:09:14:15-0500] "the GET/favicon. Ico HTTP/1.1", 404, 293 ", "
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
537.36 Google Chrome/49.0.2623.75 Safari/Favicon
"37.235.29.43 - [16/Feb/2020:10:49:49-0500] "the GET/HTTP/1.1" 200 2708 "-" "Mozilla/5.0
(Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/51.0.2704.103 Safari/537.36 "
193.56.28.37 - [16/Feb/2020:11:57:19-0500] "POST
69%/67%/63% % 69% % 62% 2 d 6 e/% 70% 68% by 70? % % 64 + % 61% 2 d 6 c % 6 c % f % 77% 5 f
5 f % 69% % 75% 72% 6 c % 6 e % 63% % 75% 64% 65% c 6 f % e + 3 d % % 2 d % 64 +
% 73% 61% 66% 65% 5 f % 6 d % f 6 f % 66% % 64% 65% 3 d % 66 + % 2 d % 64 + % 73% 75% 68% 6 f
73% 69% 6 e % 2 e % 73% % 69% 6 d % 75% % 61% 74% 69% c 6 f % e % 3 d % 6 f % e + % 2 d % 64 +
% 64% 69% 73% 61% 62% 6 c % 5 f 6 e % 63% % 66% 75% 65% 74% 69% 6 f % e % 73% 3 d % 22 + 22%
64 + % % % 2 d 6 f 65% % 70% % 5 f e % 62% 61% 73% 65% 64% 69% 72% 3 d 6 6 f e % % % % e 65 + % 2 d
6 f % 64 + % 61% 75% 74% % 5 f % 70% 72% 65% 70% 65% 6 e % 5 f % 66% 64% and 69% 65% c % 3 d
% 70% 68% 70% 69% % 2 f % 2 f % 3 a 6 e % 70% 75% 74 + % 2 d % 64 + 2 e % % 63% 67% 69% 66% 6 f
% 72% 63% 65% 5 f % 72% 65% 64% 69% 72% 65% 63% 74% 30 + % 2 d 3 d % % 64 + % 63% 67% 69% 2 e
% 72% 65% 64% 69% 72% 65% 63% 74% 5 f % 73% 74% 61% 74% 75% 73% 5 6 e f % 65% % 76% 3 d
30 + % % 2 d % 64 + % 61% 75% 74% 6 f % 5 f % 70% 72% 65% 70% 65% 6 e % 5 f % 66% 64% and 69% c
3 d % % 65% 70% 68% 70% 69% % 2 f % 2 f % 3 a 74 + 6 e 70% % 75% % 2 d % 6 e HTTP/1.1 "404 276", "
"-"
45.83.67.149 - [16/Feb/2020:13:50:59-0500] "the GET/HTTP/1.1" 200 2708 "-" "Mozilla/5.0
(Windows NT 10.0; Win64. X64; The rv: 65.0) Gecko/20100101 Firefox/65.0 "
(Each line in the file starts with an IP address.)
2. Write a Perl script to do the following.
(a) all neither percent nor words Favicon line print to file

(b) for each IP address, calculates the number of it in the file, and then output the Excel
Using the CGI module of web page, which shows that each IP address list or table of the
It in a file, the number of occurrences of this include the percent of the line
Or the word "Favicon",

Please bosses CGI (b) the statistics of the IP number and apply what to write
  • Related