Skip to content

Commit 7c02a5b

Browse files
authored
Merge pull request #1101 from Johann-PLW/main
Fix issue with modules using return_on_first_hit=True with seeker.sea…
2 parents d21ff3b + 22b4245 commit 7c02a5b

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

scripts/artifacts/booking.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,46 +1369,46 @@ def get_booking(files_found, report_folder, seeker, wrap_text, timezone_offset):
13691369
source_files = seeker.search(f'*/{identifier}/Library/Application Support/KeyValueStorageAccountDomain*', return_on_first_hit=True)
13701370
if bool(source_files):
13711371
# account
1372-
get_account(source_files[0], report_folder, timezone_offset)
1372+
get_account(source_files, report_folder, timezone_offset)
13731373

13741374
# payment methods
1375-
get_payment_methods(source_files[0], report_folder, timezone_offset)
1375+
get_payment_methods(source_files, report_folder, timezone_offset)
13761376

13771377
# */Library/Application Support/AccountSettings[.plist]
13781378
source_files = seeker.search(f'*/{identifier}/Library/Application Support/AccountSettings*', return_on_first_hit=True)
13791379
if bool(source_files):
13801380
# account settings
1381-
get_account_settings(source_files[0], report_folder, timezone_offset)
1381+
get_account_settings(source_files, report_folder, timezone_offset)
13821382

13831383
# payment methods settings
1384-
get_payment_methods_settings(source_files[0], report_folder, timezone_offset)
1384+
get_payment_methods_settings(source_files, report_folder, timezone_offset)
13851385

13861386
# */Library/Application Support/BookingClouds[.plist]
13871387
source_files = seeker.search(f'*/{identifier}/Library/Application Support/BookingClouds*', return_on_first_hit=True)
13881388
if bool(source_files):
13891389
# booked
1390-
get_booked(source_files[0], documents, report_folder, timezone_offset)
1390+
get_booked(source_files, documents, report_folder, timezone_offset)
13911391

13921392
# */Library/Application Support/KeyValueStorageRecentsDomain[.plist]
13931393
source_files = seeker.search(f'*/{identifier}/Library/Application Support/KeyValueStorageRecentsDomain*', return_on_first_hit=True)
13941394
if bool(source_files):
13951395
# recently searched
1396-
get_recently_searched(source_files[0], report_folder, timezone_offset)
1396+
get_recently_searched(source_files, report_folder, timezone_offset)
13971397

13981398
# recently booked
1399-
get_recently_booked(source_files[0], report_folder, timezone_offset)
1399+
get_recently_booked(source_files, report_folder, timezone_offset)
14001400

14011401
# viewed
1402-
get_viewed(source_files[0], report_folder, timezone_offset)
1402+
get_viewed(source_files, report_folder, timezone_offset)
14031403

14041404
# wish lists
1405-
get_wish_lists(source_files[0], report_folder, timezone_offset)
1405+
get_wish_lists(source_files, report_folder, timezone_offset)
14061406

14071407
# */Library/Application Support/KeyValueStorageSharedDomain[.plist]
14081408
source_files = seeker.search(f'*/{identifier}/Library/Application Support/KeyValueStorageSharedDomain*', return_on_first_hit=True)
14091409
if bool(source_files):
14101410
# stored destinations
1411-
get_stored_destinations(source_files[0], report_folder, timezone_offset)
1411+
get_stored_destinations(source_files, report_folder, timezone_offset)
14121412

14131413
# */Library/Application Support/NotificationsModel.sqlite
14141414
source_files = seeker.search(f'*/{identifier}/Library/Application Support/NotificationsModel.sqlite*')
@@ -1422,4 +1422,4 @@ def get_booking(files_found, report_folder, seeker, wrap_text, timezone_offset):
14221422
source_files = seeker.search(f'*/{identifier}/Library/Application Support/flight_rs_v2', return_on_first_hit=True)
14231423
if bool(source_files):
14241424
# flights searched
1425-
get_flights_searched(source_files[0], report_folder, timezone_offset)
1425+
get_flights_searched(source_files, report_folder, timezone_offset)

scripts/artifacts/googleChat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def get_googleChat(files_found, report_folder, seeker, wrap_text, timezone_offse
321321
if len(attachment) < 1:
322322
thumb = ''
323323
else:
324-
thumb = media_to_html(attachment[0], (attachment[0],), report_folder)
324+
thumb = media_to_html(attachment, (attachment,), report_folder)
325325
else:
326326
mediafilename = ''
327327
media = ''

scripts/artifacts/imeiImsi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ def imeiImsi(files_found, report_folder, seeker, wrap_text, timezone_offset):
5252
else:
5353
data_list.append((key, val ))
5454

55-
data_headers = ('Property', 'Property Value' )
55+
data_headers = ('Property', 'Property Value')
5656
return data_headers, data_list, source_path

scripts/artifacts/secretCalculator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get_secretCalculator(files_found, report_folder, seeker, wrap_text, timezone
4141
logfunc(' [!] Unable to extract db file: "{}"'.format(db_file))
4242
return
4343

44-
db = open_sqlite_db_readonly(db_file[0])
44+
db = open_sqlite_db_readonly(db_file)
4545

4646
cursor = db.cursor()
4747
cursor.execute('''
@@ -69,7 +69,7 @@ def get_secretCalculator(files_found, report_folder, seeker, wrap_text, timezone
6969
thumb = None
7070
attachmentFile = None
7171
if seekerResults:
72-
attachmentFile = seekerResults[0]
72+
attachmentFile = seekerResults
7373
thumb = media_to_html(attachmentFile, (attachmentFile,), report_folder)
7474
data_list.append((row[0], thumb, row[4], row[1], fileNameToSearch.replace('\\', '/'), row[3]))
7575

scripts/artifacts/uberClient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ def get_uber_client(files_found, report_folder, seeker, wrap_text, timezone_offs
661661
source_files = seeker.search(f'*/{identifier}/Library/Application Support/PersistentStorage/Store/PaymentFoundation.PaymentStreamModelKey/profiles',
662662
return_on_first_hit=True)
663663
if bool(source_files) and len(source_files) > 0:
664-
get_payment_profiles(source_files[0], report_folder, timezone_offset)
664+
get_payment_profiles(source_files, report_folder, timezone_offset)
665665

666666
# */Documents/database.db or */Documents/ur_message.db
667667
source_files = seeker.search(f'*/{identifier}/Documents/*.db', return_on_first_hit=False)
@@ -696,4 +696,4 @@ def get_uber_client(files_found, report_folder, seeker, wrap_text, timezone_offs
696696
source_files = seeker.search(f'*/{identifier}/Library/Application Support/com.ubercab.UberClient/__METADATA/*.ldb',
697697
return_on_first_hit=True)
698698
if bool(source_files) and len(source_files) > 0:
699-
parse_leveldb(os.path.dirname(source_files[0]), report_folder, timezone_offset)
699+
parse_leveldb(os.path.dirname(source_files), report_folder, timezone_offset)

scripts/ilapfuncs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,14 +1101,14 @@ def generate_thumbnail(imDirectory, imFilename, seeker, report_folder):
11011101
pathToThumb = os.path.join(os.path.basename(os.path.abspath(report_folder)), thumbname)
11021102
htmlThumbTag = '<img src="{0}"></img>'.format(pathToThumb)
11031103
if thumblist:
1104-
shutil.copyfile(thumblist[0],os.path.join(report_folder, thumbname))
1104+
shutil.copyfile(thumblist,os.path.join(report_folder, thumbname))
11051105
else:
11061106
#recreate thumbnail from image
11071107
#TODO: handle videos and HEIC
11081108
files = seeker.search(media_root+imDirectory+'/'+imFilename, return_on_first_hit=True)
11091109
if files:
11101110
try:
1111-
im = Image.open(files[0])
1111+
im = Image.open(files)
11121112
im.thumbnail(thumb_size)
11131113
im.save(os.path.join(report_folder, thumbname))
11141114
except:

0 commit comments

Comments
 (0)