More verbose and hide some exceptions when ^C app during csgo.exe research
This commit is contained in:
parent
337487a4eb
commit
f00c817134
1 changed files with 7 additions and 3 deletions
10
hack.py
10
hack.py
|
@ -65,16 +65,20 @@ class Hack():
|
|||
def _find_process(self, verbose: bool = False) -> Pymem:
|
||||
"""Find game process"""
|
||||
process_found = False
|
||||
print("Looking for process...") if verbose else None
|
||||
print("Looking for process... ", end="", flush=True) if verbose else None
|
||||
|
||||
pm = None
|
||||
while not process_found:
|
||||
try:
|
||||
pm = Pymem("csgo.exe")
|
||||
except:
|
||||
sleep(self.timeout)
|
||||
try:
|
||||
sleep(self.timeout)
|
||||
except KeyboardInterrupt:
|
||||
print("Canceled!")
|
||||
exit(1)
|
||||
else:
|
||||
print("Process found!") if verbose else None
|
||||
print("Process found!") if verbose else print("")
|
||||
process_found = True
|
||||
|
||||
if pm:
|
||||
|
|
Reference in a new issue