From a75de140d60aae58af46530be146c6b9d34f1c6b Mon Sep 17 00:00:00 2001 From: hakril Date: Fri, 13 Jul 2018 14:41:09 +0200 Subject: [PATCH] Added object manager samples to doc + fix Certificate.thum[b]print typo --- docs/source/sample.rst | 20 ++++++++++++++++++++ docs/source/task_scheduler.rst | 2 +- windows/crypto/certificate.py | 6 +++--- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/source/sample.rst b/docs/source/sample.rst index 5115863..9b7d7bd 100644 --- a/docs/source/sample.rst +++ b/docs/source/sample.rst @@ -128,6 +128,26 @@ Output .. literalinclude:: samples_output\event_log_eventlog.txt +.. _sample_object_manager: + +Object manager +"""""""""""""" + +.. literalinclude:: ..\..\samples\object_manager\object_manager.py + +Output + +.. literalinclude:: samples_output\object_manager_object_manager.txt + +find objects +'''''''''''' + + +.. literalinclude:: ..\..\samples\object_manager\findobj.py + +Output + +.. literalinclude:: samples_output\object_manager_findobj.txt .. _sample_wintrust: diff --git a/docs/source/task_scheduler.rst b/docs/source/task_scheduler.rst index 6443aea..954bfcb 100644 --- a/docs/source/task_scheduler.rst +++ b/docs/source/task_scheduler.rst @@ -12,7 +12,7 @@ The :class:`TaskService` is accessible via :py:attr:`windows.system.task_schedul .. warning:: - This API have not been tested on real case yet and may be subject to changes. + This API have not been tested on real cases yet and may be subject to changes. TaskService diff --git a/windows/crypto/certificate.py b/windows/crypto/certificate.py index a313243..5324ee9 100644 --- a/windows/crypto/certificate.py +++ b/windows/crypto/certificate.py @@ -244,14 +244,14 @@ class Certificate(gdef.CERT_CONTEXT): return buffer[:size.value] @property - def thumprint(self): - """The thumprint of the certificate (which is the sha1 of the encoded cert). + def thumbprint(self): + """The thumbprint of the certificate (which is the sha1 of the encoded cert). Example: >>> x - >>> x.thumprint + >>> x.thumbprint 'E2 A2 DB 76 A1 DD 8E 70 0D C6 9F CB 71 CF 29 12 C6 D9 78 97' :type: :class:`str`