Skip to content

Commit

Permalink
Chang the table and column names of the database used by CFURL_Cache (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mnrkbys authored Jul 16, 2021
1 parent e759f40 commit 7562151
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions plugins/cfurl_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
cfurl_cache.py
---------------
This plugin parses CFURL cache and extract timestamp, URL, request,
This plugin parses CFURL cache and extract date, URL, request,
response, and received data.
'''

Expand All @@ -24,7 +24,7 @@
__Plugin_Name = "CFURLCACHE" # Cannot have spaces, and must be all caps!
__Plugin_Friendly_Name = "CFURL cache"
__Plugin_Version = "1.0"
__Plugin_Description = "Parses CFURL cache and extract timestamp, URL, request, response, and received data."
__Plugin_Description = "Parses CFURL cache and extract date, URL, request, response, and received data."
__Plugin_Author = "Minoru Kobayashi"
__Plugin_Author_Email = "[email protected]"

Expand All @@ -39,8 +39,8 @@
#---- Do not change the variable names in above section ----#

class CfurlCacheItem:
def __init__(self, timestamp, url, method, req_header, http_status, resp_header, isDataOnFS, received_data, username, app_bundle_id, source):
self.timestamp = timestamp
def __init__(self, date, url, method, req_header, http_status, resp_header, isDataOnFS, received_data, username, app_bundle_id, source):
self.date = date
self.url = url
self.method = method
self.req_header = req_header
Expand Down Expand Up @@ -159,16 +159,16 @@ def OpenAndReadCFURLCache(cfurl_cache_artifacts, username, app_bundle_id, folder


def PrintAll(cfurl_cache_artifacts, output_params, source_path):
cfurl_cache_info = [('Timestamp', DataType.DATE), ('URL', DataType.TEXT), ('Method', DataType.TEXT), ('Request_Header', DataType.TEXT),
cfurl_cache_info = [('Date', DataType.DATE), ('URL', DataType.TEXT), ('Method', DataType.TEXT), ('Request_Header', DataType.TEXT),
('HTTP_Status', DataType.TEXT), ('Response_Header', DataType.TEXT), ('isDataOnFS', DataType.INTEGER), ('Received_Data', DataType.BLOB),
('User', DataType.TEXT), ('App_Bundle_ID', DataType.TEXT), ('Source', DataType.TEXT)]

data_list = []
log.info(f"{len(cfurl_cache_artifacts)} CFURL cache artifact(s) found")
for item in cfurl_cache_artifacts:
data_list.append([item.timestamp, item.url, item.method, item.req_header, item.http_status, item.resp_header, item.isDataOnFS, item.received_data, item.username, item.app_bundle_id, item.source])
data_list.append([item.date, item.url, item.method, item.req_header, item.http_status, item.resp_header, item.isDataOnFS, item.received_data, item.username, item.app_bundle_id, item.source])

WriteList("CFURL cache", "cfurl_cache", data_list, cfurl_cache_info, output_params, source_path)
WriteList("CFURL cache", "CFURL_Cache", data_list, cfurl_cache_info, output_params, source_path)

def Plugin_Start(mac_info):
'''Main Entry point function for plugin'''
Expand Down

0 comments on commit 7562151

Please sign in to comment.