Skip to content

Instantly share code, notes, and snippets.

@SeqviriouM
Created October 31, 2013 14:17
Show Gist options
  • Save SeqviriouM/7250565 to your computer and use it in GitHub Desktop.
Save SeqviriouM/7250565 to your computer and use it in GitHub Desktop.
Homework_3_IPv6
import re
fr = open('access.log','r')
ip = re.compile('^([0-9a-fA-F]?[0-9a-fA-F]?[0-9a-fA-F]?[0-9a-fA-F]?(:| )){1,8}')
count = 0
for line in fr:
if ip.search(line) != None:
count+=1
print count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment