示例#1
0
 def type(self, s):
     try:
         if s[0] == 'exit':
             raise NameError
         SendKeys(eval(s[0]))
     except NameError:
         SendKeys(s[0])
     finally:
         self.keyboard((13, ), 0)
         self.keyboard((13, ), 2)
def tripplee():
    global mykc
    if mykc < 3:
        mykc += 1
        return True
    else:
        mykc = 0
        SendKeys("""eee""")
        return False
示例#3
0
def brute():
    print "importing wordlist"
    with open("wordlist.txt", "r") as f:
        warray = [line.rstrip('\n') for line in f]
    print("\nwordlist imported")
    print "\nyou now have 10 seconds to make sure the active window is\nthe target for the bruteforce attack"
    time.sleep(10)
    attack_number = 0
    print "attack starting..."
    while int(attack_number) != int(len(warray)):
        SendKeys(warray[attack_number])
        SendKeys("{ENTER}")
        time.sleep(0.2)
        SendKeys("{ENTER}")
        attack_number += 1
    if attack_number == int(len(warray)):
        print "attack complete"
        time.sleep(5)
示例#4
0
 def __getSelectedTextWX(self):
     text = ''
     SendKeys.SendKeys('^c')
     if wx.TheClipboard.Open():
         if wx.TheClipboard.IsSupported(wx.DataFormat(wx.DF_TEXT)):
             data = wx.TextDataObject()
             wx.TheClipboard.GetData(data)
             text = data.GetText()
         wx.TheClipboard.Close()
     return text
示例#5
0
def criaChar(ID, semaforo):
    from time import sleep
    global posx, posy
    if esperaOciosa(ID, semaforo, 0.5): return
    click_left(1750, 347)  # abre cria
    if esperaOciosa(ID, semaforo, 5): return
    SendKeys(semaforo.nick)
    if esperaOciosa(ID, semaforo, 0.1): return
    click_left(1650, 640)  # escolhe AA
    if esperaOciosa(ID, semaforo, 0.1): return
    click_left(1700, 800)  # cria
    if esperaOciosa(ID, semaforo, 5): return
    loga()
示例#6
0
def apagaChar(ID, semaforo):
    press(KEY_O)
    if esperaOciosa(ID, semaforo, 0.3): return
    click_left(950, 505)  # select server
    if esperaOciosa(ID, semaforo, 0.3): return
    click_left(970, 600)  # ok
    if esperaOciosa(ID, semaforo, 4): return
    SendKeys("{ENTER}")
    if esperaOciosa(ID, semaforo, 5): return
    click_left(1885, 363)  # apagar
    if esperaOciosa(ID, semaforo, 1): return
    SendKeys(semaforo.senha)
    if esperaOciosa(ID, semaforo, 0.2): return
    SendKeys("{ENTER}")
    if esperaOciosa(ID, semaforo, 0.2): return
    click_left(960, 600)  # apagar
    if esperaOciosa(ID, semaforo, 1): return
    digitaSub(semaforo)
    if esperaOciosa(ID, semaforo, 0.5): return
    click_left(979, 599)
    if esperaOciosa(ID, semaforo, 0.5): return
    click_left(979, 599)
    if esperaOciosa(ID, semaforo, 0.5): return
    click_left(979, 599)
    if esperaOciosa(ID, semaforo, 0.5): return
    click_left(979, 599)
    if esperaOciosa(ID, semaforo, 0.5): return
    click_left(979, 599)
    if esperaOciosa(ID, semaforo, 0.5): return
    click_left(979, 599)
    if esperaOciosa(ID, semaforo, 0.5): return
    click_left(979, 599)
    if esperaOciosa(ID, semaforo, 0.5): return
    criaChar(ID, semaforo)
    state = (semaforo.getState(5) + 1) % 2
    semaforo.setState(5, state)
示例#7
0
def mpc_randomize():
    mpc_wnd = win32gui.FindWindow("MediaPlayerClassicW", None)
    navbar_wnd = win32gui.FindWindowEx(mpc_wnd, 0, None, "Navigation Bar")
    playlist_wnd = win32gui.FindWindowEx(navbar_wnd, 0, None, "Playlist")
    if playlist_wnd == 0:
        playlist_wnd = win32gui.FindWindowEx(mpc_wnd, 0, None, "Playlist")
    if playlist_wnd:
        rect = win32gui.GetWindowRect(playlist_wnd)
        win32api.SetCursorPos([rect[0] + 30, rect[1] + 40])
        win32api.mouse_event(win32con.MOUSEEVENTF_RIGHTDOWN| \
                             win32con.MOUSEEVENTF_ABSOLUTE,0,0)
        win32api.mouse_event(win32con.MOUSEEVENTF_RIGHTUP| \
                             win32con.MOUSEEVENTF_ABSOLUTE,0,0)

        SendKeys("{UP}{UP}{UP}{UP}~{HOME}{SPACE}")
示例#8
0
from SendKeys import SendKeys
from time import sleep
sleep(3)
SendKeys("%{TAB}j%{TAB}")
示例#9
0
 def __setSelectedTextWX(self, text):
     if wx.TheClipboard.Open():
         data = wx.TextDataObject(text)
         wx.TheClipboard.SetData(data)
         wx.TheClipboard.Close()
     SendKeys.SendKeys('^v')
示例#10
0
def sendKeys(iKeys):
    '''
    '''
    SendKeys.SendKeys(iKeys)
示例#11
0
        #
        # if an IDA window containing the module is open, update the address.
        #

        if ida_sync:
            if not ida_handle:
                try:
                    windll.user32.EnumWindows(WNDENUMPROC(enum_windows_proc),
                                              0)
                except:
                    pass

            windll.user32.SetForegroundWindow(ida_handle)
            windll.user32.ShowWindow(ida_handle, SW_SHOW)
            #SendKeys("+{F2}Jump+9MinEA+9+0{+}0x%08x+0;{TAB}" % (offset-0x1000), pause=0)
            SendKeys("+{F2}Jump+9MinEA+9+0{+}0x000279e7+0;{TAB}{ENTER}",
                     pause=0)
            print "jumping to offset 0x%08x in %s" % (
                (offset - 0x1000), module)

        #
        # ENSURE UDRAW IS PRESENT
        #

        if not udraw:
            continue

        # if we haven't already loaded the specified module, do so now.
        if not modules.has_key(module):
            for name in os.listdir("."):
                name = name.lower()
示例#12
0
    True
except NameError:
    True, False = 1, 0

if __name__ == '__main__':

    # create file game will be saved to
    filename = tempfile.mktemp('.txt')
    print >> sys.stdout, "saving tic-tac-toe game to `%s`" % filename
    f = open(filename, 'w')
    f.write('')
    f.close()

    # open notepad
    SendKeys("""{LWIN}rNotepad.exe{SPACE}"%(filename)s"{ENTER}{PAUSE 1}""" %
             {'filename': filename.replace('~', '{~}')},
             with_spaces=True)

    # draw board
    SendKeys("""\
   |   |   
---+---+---
   |   |   
---+---+---
   |   |  """.replace('+', '{+}'),
             0.1,
             with_spaces=True,
             with_newlines=True)

    # play the game
    SendKeys(