Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ANK1036Official committed Sep 27, 2022
1 parent 9bc068e commit ed4c88f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Binary file added rdr2_private_lobby.exe
Binary file not shown.
30 changes: 30 additions & 0 deletions rdr2_private_lobby.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import psutil
import time

def findProcessIdByName(processName):
listOfProcessObjects = []
for proc in psutil.process_iter():
try:
pinfo = proc.as_dict(attrs=['pid', 'name', 'create_time'])
if processName.lower() in pinfo['name'].lower() :
listOfProcessObjects.append(pinfo)
except (psutil.NoSuchProcess, psutil.AccessDenied , psutil.ZombieProcess) :
pass
return listOfProcessObjects;

listOfProcessIds = findProcessIdByName('RDR2.exe')

if len(listOfProcessIds) > 0:
for elem in listOfProcessIds:
processID = elem['pid']
print(f"Attempting to create private lobby... [{processID}]")
try:
p = psutil.Process(processID)
p.suspend()
time.sleep(10)
p.resume()
print('Success!')
except:
print('Failed!')
else :
print('RDR2 not running...')

0 comments on commit ed4c88f

Please sign in to comment.