Processes launched Python subprocess methods cannot access other files in Windows FS

Viewed 52

Running on Windows (Admin rights), trying to call other executable from Python via subprocess library:

>>> import subprocess

>>> subprocess.run(['C:\\Users\\User\\Downloads\\hashcat-6.2.1\\hashcat.exe', '--help'], shell=True)
hashcat (v6.2.1) starting...
CompletedProcess(args=['C:\\Users\\User\\Downloads\\hashcat-6.2.1\\hashcat.exe', '--help'], returncode=4294967295)

>>> subprocess.call(['C:\\Users\\User\\Downloads\\hashcat-6.2.1\\hashcat.exe', '--help'], shell=True)
hashcat (v6.2.1) starting...
./OpenCL/: No such file or directory
4294967295

>>> subprocess.getoutput(['C:\\Users\\User\\Downloads\\hashcat-6.2.1\\hashcat.exe', '--help'])
'hashcat (v6.2.1) starting...\n\n./OpenCL/: No such file or directory\n'

As shown, the process launches by subprocess (the hashcat (v6.2.1) starting... output tells about that), but it fails every time it tries to access another directory/file.

Can it be related to Python environmental restrictions and/or issues? Can it also be caused by Windows FS issues (I was already runnning Python console as Admin)?

P. S. I have already tried to search information about the problem, but the search gave no results as most of results were related to Linux.

Thanks in advance!

0 Answers
Related