當前位置: 首頁>>代碼示例>>Python>>正文


Python record.AllClients方法代碼示例

本文整理匯總了Python中Xlib.ext.record.AllClients方法的典型用法代碼示例。如果您正苦於以下問題:Python record.AllClients方法的具體用法?Python record.AllClients怎麽用?Python record.AllClients使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Xlib.ext.record的用法示例。


在下文中一共展示了record.AllClients方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: run

# 需要導入模塊: from Xlib.ext import record [as 別名]
# 或者: from Xlib.ext.record import AllClients [as 別名]
def run(self):
        # Create a recording context; we only want key and mouse events
        self.ctx = self.recordDisplay.record_create_context(
                0,
                [record.AllClients],
                [{
                        'core_requests': (0, 0),
                        'core_replies': (0, 0),
                        'ext_requests': (0, 0, 0, 0),
                        'ext_replies': (0, 0, 0, 0),
                        'delivered_events': (0, 0),
                        'device_events': (X.KeyPress, X.ButtonPress), #X.KeyRelease,
                        'errors': (0, 0),
                        'client_started': False,
                        'client_died': False,
                }])

        # Enable the context; this only returns after a call to record_disable_context,
        # while calling the callback function in the meantime
        logger.info("XRecord interface thread starting")
        self.recordDisplay.record_enable_context(self.ctx, self.__processEvent)
        # Finally free the context
        self.recordDisplay.record_free_context(self.ctx)
        self.recordDisplay.close() 
開發者ID:autokey,項目名稱:autokey,代碼行數:26,代碼來源:interface.py

示例2: run

# 需要導入模塊: from Xlib.ext import record [as 別名]
# 或者: from Xlib.ext.record import AllClients [as 別名]
def run(self):
        # Check if the extension is present
        if not self.record_dpy.has_extension('RECORD'):
            print_err('RECORD extension not found')
            sys.exit(1)
        r = self.record_dpy.record_get_version(0, 0)
        print_err('RECORD extension version {}.{}'.format(
            r.major_version,
            r.minor_version
        ))

        # Create a recording context; we only want key and mouse events
        self.ctx = self.record_dpy.record_create_context(
            0,
            [record.AllClients],
            [{
                'core_requests': (0, 0),
                'core_replies': (0, 0),
                'ext_requests': (0, 0, 0, 0),
                'ext_replies': (0, 0, 0, 0),
                'delivered_events': (0, 0),
                #                (X.KeyPress, X.ButtonPress),
                'device_events': tuple(self.contextEventMask),
                'errors': (0, 0),
                'client_started': False,
                'client_died': False,
            }]
        )

        # Enable the context; this only returns after a call to record_disable
        # context, while calling the callback function in the meantime
        self.record_dpy.record_enable_context(self.ctx, self.processevents)
        # Finally free the context
        self.record_dpy.record_free_context(self.ctx) 
開發者ID:GiacomoLaw,項目名稱:Keylogger,代碼行數:36,代碼來源:pyxhook.py

示例3: run

# 需要導入模塊: from Xlib.ext import record [as 別名]
# 或者: from Xlib.ext.record import AllClients [as 別名]
def run(self):
        # Check if the extension is present
        if not self.record_dpy.has_extension("RECORD"):
            print ("RECORD extension not found")
            sys.exit(1)
        r = self.record_dpy.record_get_version(0, 0)
        print ("RECORD extension version %d.%d" % (r.major_version, r.minor_version))

        # Create a recording context; we only want key and mouse events
        self.ctx = self.record_dpy.record_create_context(
                0,
                [record.AllClients],
                [{
                        'core_requests': (0, 0),
                        'core_replies': (0, 0),
                        'ext_requests': (0, 0, 0, 0),
                        'ext_replies': (0, 0, 0, 0),
                        'delivered_events': (0, 0),
                        'device_events': tuple(self.contextEventMask), #(X.KeyPress, X.ButtonPress),
                        'errors': (0, 0),
                        'client_started': False,
                        'client_died': False,
                }])

        # Enable the context; this only returns after a call to record_disable_context,
        # while calling the callback function in the meantime
        self.record_dpy.record_enable_context(self.ctx, self.processevents)
        # Finally free the context
        self.record_dpy.record_free_context(self.ctx) 
開發者ID:OmkarPathak,項目名稱:Python-Programs,代碼行數:31,代碼來源:pyxhook.py

示例4: run

# 需要導入模塊: from Xlib.ext import record [as 別名]
# 或者: from Xlib.ext.record import AllClients [as 別名]
def run(self):
        # Check if the extension is present
        if not self.record_dpy.has_extension("RECORD"):
            print("RECORD extension not found", file=sys.stderr)
            sys.exit(1)
        # r = self.record_dpy.record_get_version(0, 0)
        # print("RECORD extension version {major}.{minor}".format(
        #     major=r.major_version,
        #     minor=r.minor_version
        # ))

        # Create a recording context; we only want key and mouse events
        self.ctx = self.record_dpy.record_create_context(
            0,
            [record.AllClients],
            [{
                'core_requests': (0, 0),
                'core_replies': (0, 0),
                'ext_requests': (0, 0, 0, 0),
                'ext_replies': (0, 0, 0, 0),
                'delivered_events': (0, 0),
                #                (X.KeyPress, X.ButtonPress),
                'device_events': tuple(self.contextEventMask),
                'errors': (0, 0),
                'client_started': False,
                'client_died': False,
            }])

        # Enable the context; this only returns after a call to
        # record_disable_context, while calling the callback function in the
        # meantime
        self.record_dpy.record_enable_context(self.ctx, self.processevents)
        # Finally free the context
        self.record_dpy.record_free_context(self.ctx) 
開發者ID:nikhilkumarsingh,項目名稱:clix,代碼行數:36,代碼來源:pyxhook.py

示例5: run

# 需要導入模塊: from Xlib.ext import record [as 別名]
# 或者: from Xlib.ext.record import AllClients [as 別名]
def run(self):
        # Check if the extension is present
        if not self.record_dpy.has_extension("RECORD"):
            # print "RECORD extension not found"
            sys.exit(1)
        r = self.record_dpy.record_get_version(0, 0)
        # print "RECORD extension version %d.%d" % (r.major_version, r.minor_version)

        # Create a recording context; we only want key and mouse events
        self.ctx = self.record_dpy.record_create_context(
            0,
            [record.AllClients],
            [{
                'core_requests': (0, 0),
                'core_replies': (0, 0),
                'ext_requests': (0, 0, 0, 0),
                'ext_replies': (0, 0, 0, 0),
                'delivered_events': (0, 0),
                'device_events': tuple(self.contextEventMask),  # (X.KeyPress, X.ButtonPress),
                'errors': (0, 0),
                'client_started': False,
                'client_died': False,
            }])

        # Enable the context; this only returns after a call to record_disable_context,
        # while calling the callback function in the meantime
        self.record_dpy.record_enable_context(self.ctx, self.processevents)
        # Finally free the context
        self.record_dpy.record_free_context(self.ctx) 
開發者ID:jpdias,項目名稱:botnet-lab,代碼行數:31,代碼來源:pyxhook.py

示例6: run

# 需要導入模塊: from Xlib.ext import record [as 別名]
# 或者: from Xlib.ext.record import AllClients [as 別名]
def run(self):
        # Check if the extension is present
        if not self.record_dpy.has_extension("RECORD"):
            print "RECORD extension not found"
            sys.exit(1)
        r = self.record_dpy.record_get_version(0, 0)
        print "RECORD extension version %d.%d" % (r.major_version, r.minor_version)

        # Create a recording context; we only want key and mouse events
        self.ctx = self.record_dpy.record_create_context(
                0,
                [record.AllClients],
                [{
                        'core_requests': (0, 0),
                        'core_replies': (0, 0),
                        'ext_requests': (0, 0, 0, 0),
                        'ext_replies': (0, 0, 0, 0),
                        'delivered_events': (0, 0),
                        'device_events': tuple(self.contextEventMask), #(X.KeyPress, X.ButtonPress),
                        'errors': (0, 0),
                        'client_started': False,
                        'client_died': False,
                }])

        # Enable the context; this only returns after a call to record_disable_context,
        # while calling the callback function in the meantime
        self.record_dpy.record_enable_context(self.ctx, self.processevents)
        # Finally free the context
        self.record_dpy.record_free_context(self.ctx) 
開發者ID:hiamandeep,項目名稱:py-keylogger,代碼行數:31,代碼來源:pyxhook.py

示例7: run

# 需要導入模塊: from Xlib.ext import record [as 別名]
# 或者: from Xlib.ext.record import AllClients [as 別名]
def run(self):
        # Check if the extension is present
        if not self.record_dpy.has_extension("RECORD"):
            print("RECORD extension not found")
            sys.exit(1)
        r = self.record_dpy.record_get_version(0, 0)
        print("RECORD extension version %d.%d" % (r.major_version, r.minor_version))

        # Create a recording context; we only want key and mouse events
        self.ctx = self.record_dpy.record_create_context(
                0,
                [record.AllClients],
                [{
                        'core_requests': (0, 0),
                        'core_replies': (0, 0),
                        'ext_requests': (0, 0, 0, 0),
                        'ext_replies': (0, 0, 0, 0),
                        'delivered_events': (0, 0),
                        'device_events': tuple(self.contextEventMask), #(X.KeyPress, X.ButtonPress),
                        'errors': (0, 0),
                        'client_started': False,
                        'client_died': False,
                }])

        # Enable the context; this only returns after a call to record_disable_context,
        # while calling the callback function in the meantime
        self.record_dpy.record_enable_context(self.ctx, self.processevents)
        # Finally free the context
        self.record_dpy.record_free_context(self.ctx) 
開發者ID:BillBillBillBill,項目名稱:Tickeys-linux,代碼行數:31,代碼來源:pyxhook.py

示例8: run

# 需要導入模塊: from Xlib.ext import record [as 別名]
# 或者: from Xlib.ext.record import AllClients [as 別名]
def run(self):
        # Check if the extension is present
        if not self.record_dpy.has_extension("RECORD"):
            print "RECORD extension not found"
            sys.exit(1)
        r = self.record_dpy.record_get_version(0, 0)
        #print "RECORD extension version %d.%d" % (r.major_version, r.minor_version)

        # Create a recording context; we only want key and mouse events
        self.ctx = self.record_dpy.record_create_context(
                0,
                [record.AllClients],
                [{
                        'core_requests': (0, 0),
                        'core_replies': (0, 0),
                        'ext_requests': (0, 0, 0, 0),
                        'ext_replies': (0, 0, 0, 0),
                        'delivered_events': (0, 0),
                        'device_events': tuple(self.contextEventMask), #(X.KeyPress, X.ButtonPress),
                        'errors': (0, 0),
                        'client_started': False,
                        'client_died': False,
                }])

        # Enable the context; this only returns after a call to record_disable_context,
        # while calling the callback function in the meantime
        self.record_dpy.record_enable_context(self.ctx, self.processevents)
        # Finally free the context
        self.record_dpy.record_free_context(self.ctx) 
開發者ID:jhoward321,項目名稱:PythonP2PBotnet,代碼行數:31,代碼來源:pyxhook.py


注:本文中的Xlib.ext.record.AllClients方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。