Python Forum
[split] calling external exe with subprocess (maybe)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] calling external exe with subprocess (maybe)
#1
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)
Reply
#2
what is your question?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
pin is always 0 and username is always empty.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  calling external function with arguments Wimpy_Wellington 7 1,344 Jul-05-2023, 06:33 PM
Last Post: deanhystad
  WindowsError when calling nbtstat command using subprocess tsame 0 2,034 Mar-17-2018, 12:40 PM
Last Post: tsame

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020