Skip to content

Commit 72f6a73

Browse files
committed
broke stuff lmao
hi mom
1 parent dc2b280 commit 72f6a73

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎analyzer.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def parse_log_line(line):
1616
# Regex Pattern to match this string:
1717
# ::ffff:10.122.144.51 - - [07/Oct/2025 12:02:27] "GET / HTTP/1.1" 200 -
1818
# NOTE: I did remove the last (\d+) which stores size
19-
pattern = r'(\S+) \S+ \S+ \[([^\]]+)\] "(\S+) (\S+) (\S+)" (\d+)'
19+
pattern = r'(\S+) \S+ \S+ \[([^\]]+)\] "(\S+) (\S+) (\S+)"'
2020
match = re.match(pattern, line)
2121

2222
# If we match, create a dictionary based off of results

‎tests/test_analyzer.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def test_analyze_logs(self):
2121
report = analyze_logs('temp.log')
2222
self.assertEqual(report['errors_by_status']['500'], 1)
2323
self.assertEqual(report['errors_by_ip']['192.168.1.1'], 1)
24+
25+
# def test_blow_socks(self):
26+
# self.assertEqual(9+10,21)
2427

2528
if __name__ == '__main__':
2629
unittest.main()

0 commit comments

Comments
 (0)