Python Forum
[split] calling external exe with subprocess (maybe) - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: [split] calling external exe with subprocess (maybe) (/thread-20977.html)



[split] calling external exe with subprocess (maybe) - himbehl - Sep-09-2019

import subprocess

# runExe takes two parameters and runs CrackMe.exe.  It will return the result of CrackMe.exe as a string
username=str()
# username: string
pin=int()
# pin: int
# return: string
def runExe(username, pin):
    out = subprocess.check_output(["CrackMe.exe", username, str(pin)], shell=True)
    out = str(out, 'utf-8')
    out = out.strip()
    return out

# Example of how runExe is used (replace this with your solution)
output = runExe("[email protected]", 1000)
print(output)



RE: [split] How to ask Smart Questions (thread title expansion) - buran - Sep-09-2019

what is your question?


RE: [split] calling external exe with subprocess (maybe) - DeaD_EyE - Sep-09-2019

pin is always 0 and username is always empty.