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 hashlib | |
import sys | |
BLOCK_SIZE = 4096 | |
def get_blocks(file): | |
while True: | |
block = file.read(BLOCK_SIZE) | |
if not block: | |
break |
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
#! /bin/python3 | |
# alternative for scp command | |
import logging | |
import paramiko | |
class SSHClient: | |
def __init__(self, host, user, psw) -> None: | |
self.ssh = paramiko.SSHClient() |