Exemplo n.º 1
0
path = "%PROGRAMFILES(x86)%\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe"
path = r'C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client\vpnui.exe'
app = application.Application()
sleep(1)
app.start(path)
cac = r'Cisco AnyConnect'
smc = r'Cisco AnyConnect Secure Mobility Client'
pattern = r'Cisco AnyConnect (\|) ([\w ]+)'
EnumWindows(EnumWindowsProc(foreach_window), 0)
l = sorted([similar(title, cac) for title in windows], reverse=True)[:2]

if l[0][1] == smc:
    print('Found:', smc)
    for _ in range(3):
        PressKey(VK_TAB)
        ReleaseKey(VK_TAB)
        sleep(0.05)
    PressKey(0x0D)
    ReleaseKey(0x0D)

start = time()
while not re.match(pattern, l[0][1]):
    sleep(0.1)
    if time() > start + timeout:
        input('Waiting too long for %s prompt' % cac)
		exit() # wait for user input before exit
    EnumWindows(EnumWindowsProc(foreach_window), 0)
    l = sorted([similar(title, cac) for title in windows], reverse=True)[:2]

print(otp.now())
for c in password + '\t' + otp.now() + '\t\r':
Exemplo n.º 2
0
def Slow():
	PressKey(S)
	ReleaseKey(W)
	ReleaseKey(A)
	time.sleep(0.05)
	ReleaseKey(S)
Exemplo n.º 3
0
        on = True
        currentStateIndex = 0
        time.sleep(2)
    elif pos == (width - 1, 0):
        print('--End botting--')
        tick = 0
        on = False
        time.sleep(2)
    elif pos == (width - 1, height - 1):
        print('Program exits normally')
        quit()

    if on and tick % (CYCLE_INTERVAL * 10) == 0:
        PressKey(MOUNT2_BUTTON)
        time.sleep(0.2)
        ReleaseKey(MOUNT2_BUTTON)
        time.sleep(1)
        PressKey(MOUNT_BUTTON)
        time.sleep(0.2)
        ReleaseKey(MOUNT_BUTTON)
        time.sleep(1)

        # drop from air mount
        PressKey(MOUNT_BUTTON)
        time.sleep(0.2)
        ReleaseKey(MOUNT_BUTTON)
        # take damage from falling
        time.sleep(4)
        # wildfire
        PressKey(ATTACK_BUTTON)
        time.sleep(0.2)
Exemplo n.º 4
0
def Right():
	PressKey(D)
	ReleaseKey(A)
	ReleaseKey(W)
	time.sleep(0.01)
	ReleaseKey(D)
Exemplo n.º 5
0
def Left():
	PressKey(A)
	ReleaseKey(W)
	ReleaseKey(D)
	time.sleep(0.01)
	ReleaseKey(A)
Exemplo n.º 6
0
def Straight():
	PressKey(W)
	ReleaseKey(A)
	ReleaseKey(D)
Exemplo n.º 7
0
def PressReleaseKey(key):
    PressKey(key)
    time.sleep(0.2)
    ReleaseKey(key)
Exemplo n.º 8
0
tick = 0
on = False

while True:
    pos = pyautogui.position()
    if pos == (0, 0):
        print('--Start botting--')
        on = True
        time.sleep(2)
    elif pos == (width - 1, 0):
        print('--Pause botting--')
        on = False
        time.sleep(2)
    elif pos == (width - 1, height - 1):
        print('Program exits normally')
        quit()

    if on:
        if tick % FISH_INTERVAL == 0:
            # press space
            PressKey(SCAN_CODE.SPACE.value)
            time.sleep(0.2)
            ReleaseKey(SCAN_CODE.SPACE.value)
        if tick % BAIT_INTERVAL == 0:
            time.sleep(4)
            PressKey(SCAN_CODE.SIX.value)
            time.sleep(0.2)
            ReleaseKey(SCAN_CODE.SIX.value)
        tick += 1
    time.sleep(0.1)