mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
246 lines
17 KiB
HTML
246 lines
17 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
||
<title>Welcome to PythonForWindows’s documentation! — PythonForWindows 0.3 documentation</title>
|
||
|
||
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||
|
||
<script type="text/javascript">
|
||
var DOCUMENTATION_OPTIONS = {
|
||
URL_ROOT: './',
|
||
VERSION: '0.3',
|
||
COLLAPSE_INDEX: false,
|
||
FILE_SUFFIX: '.html',
|
||
HAS_SOURCE: true,
|
||
SOURCELINK_SUFFIX: '.txt'
|
||
};
|
||
</script>
|
||
<script type="text/javascript" src="_static/jquery.js"></script>
|
||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="1. The windows module" href="windows.html" />
|
||
</head>
|
||
<body role="document">
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="windows.html" title="1. The windows module"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="#">PythonForWindows 0.3 documentation</a> »</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="welcome-to-pythonforwindows-s-documentation">
|
||
<h1>Welcome to PythonForWindows’s documentation!<a class="headerlink" href="#welcome-to-pythonforwindows-s-documentation" title="Permalink to this headline">¶</a></h1>
|
||
<div class="section" id="description">
|
||
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
|
||
<p>PythonForWindows is a base of code aimed to make interaction with <code class="docutils literal"><span class="pre">Windows</span></code> (on X86/X64) easier (for both 32 and 64 bits Python).
|
||
Its goal is to offer abstractions around some of the OS features in a (I hope) pythonic way.
|
||
It also tries to make the barrier between python and native execution thinner in both ways.
|
||
There is no external dependencies but it relies heavily on the <code class="docutils literal"><span class="pre">ctypes</span></code> module.</p>
|
||
<p>Some of this code is clean (IMHO) and some parts are just a wreck that works for now.
|
||
Let’s say that the codebase evolves with my needs and my curiosity.</p>
|
||
<p>If you have any issue, question, suggestion do not hesitate to contact me.
|
||
I am always glad to have feedbacks from people using this project.</p>
|
||
<p>Examples are available on the <a class="reference external" href="https://github.com/hakril/pythonforwindows#pythonforwindows">github page</a> and in the <a class="reference internal" href="sample.html#sample-of-code"><span class="std std-ref">Samples of code</span></a>.</p>
|
||
</div>
|
||
<div class="section" id="documentation">
|
||
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline">¶</a></h2>
|
||
<div class="toctree-wrapper compound">
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="windows.html">1. The <code class="docutils literal"><span class="pre">windows</span></code> module</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="windows.html#the-system-object">1.1. The <code class="docutils literal"><span class="pre">system</span></code> object</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="various.html">2. The <code class="docutils literal"><span class="pre">windows</span></code> objects</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="process.html">2.1. Processes and Threads</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="process.html#peb-exploration">2.2. PEB Exploration</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="process.html#pefile-parsing-loaded-pe">2.3. PEFile - Parsing loaded PE</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="exception.html">2.4. Exception and Context related structures</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="registry.html">2.5. Registry</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="network.html">2.6. Network</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="service.html">2.7. Service</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="volume.html">2.8. Volume – The logical drives</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="wmi.html">2.9. WMI – Make request to WMI</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="handle.html">2.10. Handle – Processes handles</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="native_exec.html">3. <code class="docutils literal"><span class="pre">windows.native_exec</span></code> – Native Code Execution</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="native_exec.html#module-windows.native_exec.cpuid">3.1. <code class="docutils literal"><span class="pre">windows.native_exec.cpuid</span></code> – Interface to native CPUID</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="native_exec.html#module-windows.native_exec.simple_x86">3.2. <code class="docutils literal"><span class="pre">windows.native_exec.simple_x86</span></code> – X86 Assembler</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="native_exec.html#module-windows.native_exec.simple_x64">3.3. <code class="docutils literal"><span class="pre">windows.native_exec.simple_x64</span></code> – X64 Assembler</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="native_exec.html#module-windows.native_exec.nativeutils">3.4. <code class="docutils literal"><span class="pre">windows.native_exec.nativeutils</span></code> – Native utility functions</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="winproxy.html">4. <code class="docutils literal"><span class="pre">windows.winproxy</span></code> – Windows API</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="winproxy.html#example-virtualalloc">4.1. Example: <code class="docutils literal"><span class="pre">VirtualAlloc</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="winproxy.html#functions-in-windows-winproxy">4.2. Functions in <code class="docutils literal"><span class="pre">windows.winproxy</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="utils.html">5. <code class="docutils literal"><span class="pre">windows.utils</span></code> – Windows Utilities</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="utils.html#context-managers">5.1. Context Managers</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="utils.html#helper-functions">5.2. Helper functions</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="wintrust.html">6. <code class="docutils literal"><span class="pre">windows.wintrust</span></code> – Checking signature</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="wintrust.html#api">6.1. API</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="debug.html">7. <code class="docutils literal"><span class="pre">windows.debug</span></code> – Debugging</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="debug.html#debugger">7.1. <code class="docutils literal"><span class="pre">Debugger</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="debug.html#localdebugger">7.2. <code class="docutils literal"><span class="pre">LocalDebugger</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="debug.html#breakpoint">7.3. <code class="docutils literal"><span class="pre">Breakpoint</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="com.html">8. <code class="docutils literal"><span class="pre">windows.com</span></code> - Component Object Model</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="com.html#using-a-com-interface">8.1. Using a COM interface</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="com.html#implementing-a-com-interface">8.2. Implementing a COM interface</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="crypto.html">9. <code class="docutils literal"><span class="pre">windows.crypto</span></code> – CryptoAPI</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="crypto.html#encryption">9.1. Encryption</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="crypto.html#certificate">9.2. Certificate</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="crypto.html#module-windows.crypto.generation">9.3. Generating componants</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="alpc.html">10. <code class="docutils literal"><span class="pre">windows.alpc</span></code> – Advanced Local Procedure Call</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="alpc.html#alpc-message">10.1. ALPC Message</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="alpc.html#alpc-client">10.2. ALPC client</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="alpc.html#alpc-server">10.3. ALPC Server</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="rpc.html">11. <code class="docutils literal"><span class="pre">windows.rpc</span></code> – ALPC-based Windows RPC</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="rpc.html#rpcclient">11.1. RPCClient</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="rpc.html#epmapper">11.2. Epmapper</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="rpc.html#module-windows.rpc.ndr">11.3. Ndr</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="generated.html">12. <code class="docutils literal"><span class="pre">windows.generated_def</span></code> – generated Windows defines and structures</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="windef_generated.html">12.1. Windef</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="ntstatus_generated.html">12.2. Ntstatus</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="winstructs_generated.html">12.3. Winstructs</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="winstructs_generated.html#winenums">12.4. WinEnums</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="generated.html#example">12.5. Example</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="iat_hook.html">13. IAT hooking</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="iat_hook.html#putting-an-iat-hook">13.1. Putting an IAT hook</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="iat_hook.html#hook-protocol">13.2. Hook protocol</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="iat_hook.html#module-windows.hooks">13.3. <code class="docutils literal"><span class="pre">windows.hooks</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="wip.html">14. Early Work In Progress</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="internals.html">15. Internals</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="internals.html#module-windows.remotectypes">15.1. remotectypes.py</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="internals.html#module-windows.syswow64">15.2. syswow64.py – Crossing the heaven gate</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l1"><a class="reference internal" href="sample.html">16. Samples of code</a><ul>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#processes">16.1. Processes</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#windows-system">16.2. <code class="docutils literal"><span class="pre">windows.system</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#network-socket-exploration">16.3. <code class="docutils literal"><span class="pre">Network</span></code> - socket exploration</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#registry">16.4. <code class="docutils literal"><span class="pre">Registry</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#windows-wintrust">16.5. <code class="docutils literal"><span class="pre">windows.wintrust</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#vectoredexception">16.6. <code class="docutils literal"><span class="pre">VectoredException()</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#debugging">16.7. Debugging</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#wmi-requests">16.8. WMI requests</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#using-com-inetfwpolicy2">16.9. using COM: <code class="docutils literal"><span class="pre">INetFwPolicy2</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#windows-crypto">16.10. <code class="docutils literal"><span class="pre">windows.crypto</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#windows-alpc">16.11. <code class="docutils literal"><span class="pre">windows.alpc</span></code></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="sample.html#windows-rpc">16.12. <code class="docutils literal"><span class="pre">windows.rpc</span></code></a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="indices-and-tables">
|
||
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
|
||
<ul class="simple">
|
||
<li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
|
||
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
|
||
<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<h3><a href="#">Table Of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">Welcome to PythonForWindows’s documentation!</a><ul>
|
||
<li><a class="reference internal" href="#description">Description</a></li>
|
||
<li><a class="reference internal" href="#documentation">Documentation</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a class="reference internal" href="#indices-and-tables">Indices and tables</a></li>
|
||
</ul>
|
||
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="windows.html"
|
||
title="next chapter">1. The <code class="docutils literal"><span class="pre">windows</span></code> module</a></p>
|
||
<div role="note" aria-label="source link">
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="_sources/index.rst.txt"
|
||
rel="nofollow">Show Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3>Quick search</h3>
|
||
<form class="search" action="search.html" method="get">
|
||
<div><input type="text" name="q" /></div>
|
||
<div><input type="submit" value="Go" /></div>
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="windows.html" title="1. The windows module"
|
||
>next</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="#">PythonForWindows 0.3 documentation</a> »</li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2015, Clement Rouault.
|
||
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.5.2.
|
||
</div>
|
||
</body>
|
||
</html> |