Skip to content

Instantly share code, notes, and snippets.

@Robokishan
Created April 17, 2023 05:36
Show Gist options
  • Save Robokishan/e255a22e2a728c6c9512f239df0fceb2 to your computer and use it in GitHub Desktop.
Save Robokishan/e255a22e2a728c6c9512f239df0fceb2 to your computer and use it in GitHub Desktop.
Bypass employee timer software
# from pynput.keyboard import Key, Controller
import time
import random
import sys
import pyautogui
from datetime import datetime
# keyboard = Controller()
start = 20
end = 59
MODES = {"ufast" : (0, 2), "fast": (0,10), "slow": (20, 59), "uslow": (20, 59)}
GLOBAL_MODE = "uslow"
CHANGE_RANDOM_MODE = True
random_timer_mode = 5
ONE_MINUTE_DEFAULT = 60
start_time = 0
prev_time = time.time()
if len(sys.argv) > 1:
try:
start = MODES[sys.argv[1]][0]
end = MODES[sys.argv[1]][1]
GLOBAL_MODE = sys.argv[1]
except Exception as e:
print("Mode not found default taken")
# while 1:
# timer = random.randint(start, end)
# print(f"timer : {timer}")
# time.sleep(timer)
# keyboard.press('a')
# keyboard.release('a')
pyautogui.FAILSAFE = False
random_keys = [ 'ctrl', 'command', 'option', 'shift' ]
while 1:
# get from global mode
timer = random.randint(MODES[GLOBAL_MODE][0], MODES[GLOBAL_MODE][1])
# CHANGE GLOBAL MODE TO RANDOM
if CHANGE_RANDOM_MODE == True and random_timer_mode < (time.time() - prev_time):
_prev_mode = GLOBAL_MODE
while _prev_mode == GLOBAL_MODE:
__random_index = random.randint(0, len(list(MODES.keys())) - 1)
GLOBAL_MODE = list(MODES.keys())[__random_index]
random_timer_mode = random.randint(0, ONE_MINUTE_DEFAULT)
print(f"Changed mode {_prev_mode} => {GLOBAL_MODE} will {random_timer_mode}")
prev_time = time.time()
_index = random.randint(0, len(random_keys) - 1)
_date_time = datetime.now().strftime("%I:%M:%S")
print(f"{_date_time} test : {timer} {random_keys[_index]}")
time.sleep(timer)
pyautogui.press(random_keys[_index]) # Simulate pressing the Escape
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment