This file contains 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
def get_hash(file_path, hash_name="sha256", block_size=4096): | |
# hash_name = md5 / sha256 / sha512 | |
hash = hashlib.new(hash_name) | |
with open(file_path, "rb") as f: | |
for block in iter(lambda: f.read(block_size), ""): | |
hash.update(block) | |
return hash.hexdigest() |
This file contains 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
@load base/protocols/conn | |
@load base/protocols/smtp | |
event mime_all_data(c: connection, length: count, data: string) | |
{ | |
local conn_key: string; | |
local cmd: string; | |
if ( ! c?$smtp ) | |
return; |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am albertzaharovits on github. | |
* I am albertzaharovits (https://keybase.io/albertzaharovits) on keybase. | |
* I have a public key ASB1G2TuWDfj_Sk3Gyx3iXIFpEdsw1QTqW_AOxfAKfuGVQo | |
To claim this, I am signing this object: |