2017-07-14, 14:42
(2017-07-14, 14:09)SEIKT Wrote: Hey dmd, took a stab at using your encryption but I've hit a bump.
This is the command I've entered into shell:
$ python encryptFolder.py saltfile saltpass /home/user/crypt/source home/user/crypt/target
but it returns this error:
Traceback (most recent call last):
File "encryptFolder.py", line 27, in <module>
encrypt_dir(source, target)
File "encryptFolder.py", line 23, in encrypt_dir
encrypt.encryptFile(source + '/' + file, target +'/'+encrypt.encryptString(file))
TypeError: cannot concatenate 'str' and 'NoneType' objects
Which device is this? Seems encrypt.encryptString returns None because the modules fail to load. I thought crypto is fairly standard, especially in linux. On all my Debian Jessie installs, I never had to install the crypto module -- even on my VPSes, I don't even have PIP installed to do so.
try:
import Crypto.Random
from Crypto.Cipher import AES
import hashlib
ENCRYPTION_ENABLE = 1
except:
ENCRYPTION_ENABLE = 0
Can you create a test.py with the following lines and see what the error returned:
import Crypto.Random
from Crypto.Cipher import AES
import hashlib
print "hello world"
I also noticed while looking at the code, I haven't updated it with the latest encryptFolder that is recursive (I have it being tested in another repository). I'll update it today (but that won't fix your issue).