Python Integration
Read Netcap Audit records from Python
Last updated
Read Netcap Audit records from Python
Last updated
The Python library for interacting with netcap audit records has been published here:
Currently it is possible to retrieve the audit records as python dictionary:
#!/usr/bin/python
import pynetcap as nc
reader = nc.NCReader('pcaps/HTTP.ncap.gz')
reader.read(dataframe=False)
print("RECORDS:")
print(reader.records)
Retrieving the audit records as pandas dataframe:
#!/usr/bin/python
import pynetcap as nc
reader = nc.NCReader('pcaps/HTTP.ncap.gz')
reader.read(dataframe=True)
print("[INFO] completed reading the audit record file:", reader.filepath)
print("DATAFRAME:")
print(reader.df)