2
嘗試運行使用python命令與subprocess.call
,但我得到一個語法錯誤subprocces.call語法錯誤蟒蛇
#Takes cipher and password, executes openssl command in console
def decrypt(cipher, password):
try:
print 'Attempting decryption ---> Cipher: ' +cipher+ ' Password: ' + password
call(['openssl', 'enc', '-d', cipher, '/media/"username"/Data Drive/Documents/Project mangement/forensics/images/19_1.enc','-out', 'decrypted.dat' '-k', password])
except Error as e:
print e
Traceback (most recent call last):
File "/media/"username"/Data Drive/Downloads/bruteforce(2).py", line 9, in <module>
import call
File "/home/"username"/.local/lib/python2.7/site-packages/call/__init__.py", line 37
class _PythonCall(metaclass=ABCMeta):
^
SyntaxError: invalid syntax
這樣看來,無論是由'進口call'進口中有一個語法錯誤,這是最有可能不是在所有相關到你發佈的代碼中......'call'不是標準庫模塊之一,所以我不知道它是什麼......除非它應該是來自「子進程調用」的東西...... – twalberg