Created
May 23, 2020 20:17
-
-
Save temach/ed801e9d4ce622bf393b52942aef7b40 to your computer and use it in GitHub Desktop.
Please see ccf-project's report for more information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from timesketch_api_client import client | |
import pandas as pd | |
pd.options.display.max_colwidth = 60 | |
# set the connection parameters | |
server = 'http://0.0.0.0' | |
user = 'admin' | |
password = 'INSERT_PASSWORD_HERE' | |
ts_client = client.TimesketchApi(server, user, password) | |
# get the right sketch | |
sketches = ts_client.list_sketches() | |
print(sketches[0].name) | |
current = sketches[0] | |
# make a query | |
ts_results = current.explore( | |
'data_type:"dpkg:line"', | |
return_fields='datetime,timestamp_desc,data_type,inode,filename', | |
as_pandas=True) | |
# print results | |
print(ts_results) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment