Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In progress #127

Merged
merged 3 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions scripts/artifacts/snapChatmemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def get_snapChatmemo(files_found, report_folder, seeker, wrap_text):
one = (os.path.split(file_found))
username = (os.path.basename(one[0]))

data_list = []

if filename.startswith('memories.csv'):
pathforreport = file_found

Expand All @@ -31,7 +33,7 @@ def get_snapChatmemo(files_found, report_folder, seeker, wrap_text):
limit = index + 1
break

data_list = []

with open(file_found, 'r') as f:
for index, line in enumerate(f):
#print(f'linea: {line}')
Expand All @@ -55,9 +57,7 @@ def get_snapChatmemo(files_found, report_folder, seeker, wrap_text):

data_list.append((timestampfinal, memories[0], memories[1], thumb, memories[2], memories[3], memories[4], memories[5], memories[6]))



if data_list:
if len(data_list) > 0 :
report = ArtifactHtmlReport(f'Snapchat - Memories Metadata')
report.start_artifact_report(report_folder, f'Snapchat - Memories Metadata - {username}')
report.add_script()
Expand All @@ -73,8 +73,9 @@ def get_snapChatmemo(files_found, report_folder, seeker, wrap_text):

kmlactivity = f'Snapchat - Memories Metadata - {username}'
kmlgen(report_folder, kmlactivity, data_list, data_headers)
else:
logfunc(f'Snapchat - Memories Metadata - {username}')

if len(data_list) < 1:
logfunc(f'No Snapchat - Memories Metadata - {username}')

__artifacts__ = {
"snapChatmemo": (
Expand Down
6 changes: 4 additions & 2 deletions scripts/artifacts/snapchatConv.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def get_snapchatConv(files_found, report_folder, seeker, wrap_text):
data_list_ip =[]
with open(file_found, 'r', errors='backslashreplace') as f:
for line in f:
if '=' in line:
header = f.readline()
if 'ip,action,timestamp,user_agent,status,verification_method' in line:
header = line #f.readline()
numberofcolumns = header.count(',')+1
break
delimited = csv.reader(f, delimiter=',')
Expand All @@ -257,7 +257,9 @@ def get_snapchatConv(files_found, report_folder, seeker, wrap_text):

data_list_ip.append((timestampfinal, ip, type, useragent, status, vermethod))
else:
print(delimited)
for item in delimited:
print(item)
ip = item[0]
type = item[1]
fecha = item[2]
Expand Down