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


Messages In This Thread
[split] calling external exe with subprocess (maybe) - by himbehl - Sep-09-2019, 04:12 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  calling external function with arguments Wimpy_Wellington 7 1,511 Jul-05-2023, 06:33 PM
Last Post: deanhystad
  WindowsError when calling nbtstat command using subprocess tsame 0 2,085 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