MCPcopy Index your code
hub / github.com/jipegit/OSXAuditor / ParseDownloads

Function ParseDownloads

osxauditor.py:551–571  ·  view source on GitHub ↗

Hash all users\' downloaded files

()

Source from the content-addressed store, hash-verified

549 PrintAndLog(Path.decode('utf-8') + u' is empty', 'INFO')
550
551def ParseDownloads():
552 ''' Hash all users\' downloaded files '''
553
554 PrintAndLog(u'Users\' downloads', 'SECTION')
555 for User in os.listdir(os.path.join(ROOT_PATH, 'Users')):
556 if User[0] != '.':
557 DlUserPath = os.path.join(ROOT_PATH, 'Users', User, 'Downloads')
558 if os.path.isdir(DlUserPath):
559 HashDir(User + u'\'s downloads', DlUserPath)
560 else:
561 PrintAndLog(DlUserPath + u' does not exist', 'DEBUG')
562 OldEmailUserPath = os.path.join(ROOT_PATH, 'Users', User, 'Library/Mail Downloads/')
563 if os.path.isdir(OldEmailUserPath):
564 HashDir(User + u'\'s old email downloads', OldEmailUserPath)
565 else:
566 PrintAndLog(OldEmailUserPath + u' does not exist', 'DEBUG')
567 EmailUserPath = os.path.join(ROOT_PATH, 'Users', User, 'Library/Containers/com.apple.mail/Data/Library/Mail Downloads')
568 if os.path.isdir(EmailUserPath):
569 HashDir(User + u'\'s email downloads', EmailUserPath)
570 else:
571 PrintAndLog(EmailUserPath + u' does not exist', 'DEBUG')
572
573def DumpSQLiteDb(SQLiteDbPath):
574 ''' Dump a SQLite database file '''

Callers 1

MainFunction · 0.85

Calls 2

PrintAndLogFunction · 0.85
HashDirFunction · 0.85

Tested by

no test coverage detected