#!/usr/bin/env python

from socket import *
IP_FW_CTX_GET = 95
s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)
buf = s.getsockopt(IPPROTO_IP, IP_FW_CTX_GET, 1000)
for l in buf.split('\n'):
    ctx = l.strip().split(':')[0]
    if ctx:
        print ctx

