Avnsx / EFT_Flea_Market_Bot

Escape from Tarkov Flea Market bot, to generate a lot of in-game currency within shortest time, while not even having to actively play the game!
MIT License
24 stars 9 forks source link

getToken.py - does not kill all the specified processes #1

Closed astron4ik closed 4 years ago

astron4ik commented 4 years ago

When you receive a token, you look for the remaining pID for the processes, and a command is generated only to close the last process.

You need to add a variable for the kill commands of other processes by pid

Example:

token = psutil.Process(getProcessPID('EscapeFromTarkov_BE.exe')).cmdline()[3][7:]
pID = getProcessPID('EscapeFromTarkov_BE.exe')
command_tarkovBE = 'taskkill /PID ' + str(pID) + ' /f'
time.sleep(0.33)

pID = getProcessPID('EscapeFromTarkov.exe')
command_tarkov = 'taskkill /PID ' + str(pID) + ' /f'
time.sleep(0.33)

pID = getProcessPID('UnityCrashHandler64.exe')
command_unity = 'taskkill /PID ' + str(pID) + ' /f'

In the token found change the functions to kill, according to the received commands

subprocess.Popen(command_tarkovBE, stdout=DEVNULL, stderr=DEVNULL)
subprocess.Popen(command_tarkov, stdout=DEVNULL, stderr=DEVNULL)
subprocess.Popen(command_unity, stdout=DEVNULL, stderr=DEVNULL)

And you can also describe a common function to kill processes, but it is up to you.

PS Sorry for my bad English, I use a translator. If you need help with adjustment getToken.py, please contact me.

Avnsx commented 4 years ago

https://github.com/Avnsx/EFT_Flea_Market_Bot/commit/65e7cf3ffc1c82a61e9385ca0b7ce4a2f439cdfc @astron4ik I tried rewriting it like you recommended, but the next user opened a issue ticket with an error that I've attached as comment to above commit. What did I do wrong? I currently don't have access to the game equaling in myself not being able to text & fix the error.

astron4ik commented 4 years ago

As far as I know, when the process of Tarkov_be is killed, the Tarkov process closes automatically. Please check this through the task manager. If this is the case, then subprocess.Popen(command_tarkov***) for tarkov (not BE) is not needed.

Avnsx commented 4 years ago

Yes I've just removed the lines that would kill tarkov and unitycrashhandler, it's whatever!