View gist:6513244bd2b983b66970cf953004cbfa
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
# install the dependence by "python3 -m pip install pysmb" | |
from smb import SMBConnection | |
def CheckFilesInNASbySamba(): | |
username = 'username' | |
password = 'password' | |
path = r'fs/folder/whatever' | |
system_name = '192.168.0.1' | |
domain = '' | |
try: | |
conn = SMBConnection.SMBConnection(username,password,path,system_name,domain, |
View gist:7c17b8b7684557f495bd50952586f34f
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
#!/bin/bash | |
# getdatafromemail.py read password by password = sys.stdin.read() | |
if [ -z "$1" ] || [ "productive" != "$1" ]; then | |
# run by "run.getdatafromemail.sh" or "run.getdatafromemail.sh whatever_except_productive" | |
password=PASSWORD | |
echo "----debugging mode----" | |
if [ $password = "PASSWORD" ]; then | |
echo "entr password to receive email" | |
read -s password |