Skip to content

Instantly share code, notes, and snippets.

@spellancer
Last active December 27, 2015 02:29
Show Gist options
  • Save spellancer/7252415 to your computer and use it in GitHub Desktop.
Save spellancer/7252415 to your computer and use it in GitHub Desktop.
6
import socket
fr = open ("access.log", "r")
fw = open ("output.txt","w")
c = 0
l = fr.readlines()
for i in l:
a = i.split()
try:
socket.inet_pton(socket.AF_INET6,a[0])
c += 1
except:
c+=0
fw.write(str(c))
fr.close()
fw.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment