PyMemoryEditor 1.4.6__tar.gz → 1.4.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PKG-INFO +1 -1
  2. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor/__init__.py +1 -1
  3. PyMemoryEditor-1.4.7/PyMemoryEditor/win32/enums/__init__.py +5 -0
  4. PyMemoryEditor-1.4.7/PyMemoryEditor/win32/enums/memory_allocation_states.py +49 -0
  5. PyMemoryEditor-1.4.7/PyMemoryEditor/win32/enums/memory_protections.py +90 -0
  6. PyMemoryEditor-1.4.7/PyMemoryEditor/win32/enums/memory_types.py +16 -0
  7. PyMemoryEditor-1.4.7/PyMemoryEditor/win32/enums/process_operations.py +58 -0
  8. PyMemoryEditor-1.4.7/PyMemoryEditor/win32/enums/standard_access_rights.py +26 -0
  9. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor.egg-info/PKG-INFO +1 -1
  10. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor.egg-info/SOURCES.txt +7 -1
  11. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/setup.py +6 -1
  12. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/LICENSE +0 -0
  13. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor/open_process.py +0 -0
  14. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor/process/__init__.py +0 -0
  15. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor/process/errors.py +0 -0
  16. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor/process/util.py +0 -0
  17. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor/win32/functions.py +0 -0
  18. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor/win32/types.py +0 -0
  19. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor/win32/util.py +0 -0
  20. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor.egg-info/dependency_links.txt +0 -0
  21. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor.egg-info/requires.txt +0 -0
  22. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/PyMemoryEditor.egg-info/top_level.txt +0 -0
  23. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/README.md +0 -0
  24. {PyMemoryEditor-1.4.6 → PyMemoryEditor-1.4.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyMemoryEditor
3
- Version: 1.4.6
3
+ Version: 1.4.7
4
4
  Summary: A Python library to edit and track memory of Windows processes (32 bits and 64 bits).
5
5
  Home-page: https://github.com/JeanExtreme002/PyMemoryEditor
6
6
  Author: Jean Loui Bernard Silva de Jesus
@@ -6,7 +6,7 @@ reading and writing values in the process memory.
6
6
  """
7
7
 
8
8
  __author__ = "Jean Loui Bernard Silva de Jesus"
9
- __version__ = "1.4.6"
9
+ __version__ = "1.4.7"
10
10
 
11
11
  import sys
12
12
 
@@ -0,0 +1,5 @@
1
+ from .memory_allocation_states import MemoryAllocationStatesEnum
2
+ from .memory_protections import MemoryProtectionsEnum
3
+ from .memory_types import MemoryTypesEnum
4
+ from .process_operations import ProcessOperationsEnum
5
+ from .standard_access_rights import StandardAccessRightsEnum
@@ -0,0 +1,49 @@
1
+ # -*- coding: utf-8 -*-
2
+ from enum import Enum
3
+
4
+
5
+ class MemoryAllocationStatesEnum(Enum):
6
+ """
7
+ Enum with all states of a memory page allocation.
8
+ """
9
+ # Indicates committed pages for which physical storage has been allocated,
10
+ # either in memory or in the paging file on disk.
11
+ MEM_COMMIT = 0x1000
12
+
13
+ # Indicates free pages not accessible to the calling process and available
14
+ # to be allocated. For free pages, the information in the AllocationBase,
15
+ # AllocationProtect, Protect, and Type members is undefined.
16
+ MEM_FREE = 0x10000
17
+
18
+ # Allocates memory using large page support. The size and alignment must be a multiple
19
+ # of the large-page minimum. To obtain this value, use the GetLargePageMinimum function.
20
+ # If you specify this value, you must also specify MEM_RESERVE and MEM_COMMIT.
21
+ MEM_LARGE_PAGES = 0x20000000
22
+
23
+ # Reserves an address range that can be used to map Address Windowing Extensions (AWE) pages.
24
+ # This value must be used with MEM_RESERVE and no other values.
25
+ MEM_PHYSICAL = 0x00400000
26
+
27
+ # Allocates memory at the highest possible address. This can be slower than regular
28
+ # allocations, especially when there are many allocations.
29
+ MEM_TOP_DOWN = 0x00100000
30
+
31
+ # Indicates reserved pages where a range of the process's virtual address
32
+ # space is reserved without any physical storage being allocated. For reserved
33
+ # pages, the information in the Protect member is undefined.
34
+ MEM_RESERVE = 0x2000
35
+
36
+ # Indicates that data in the memory range is no longer of interest. The pages
37
+ # should not be read from or written to the paging file. However, the memory
38
+ # block will be used again later, so it should not be decommitted. This value
39
+ # cannot be used with any other value.
40
+ MEM_RESET = 0x00080000
41
+
42
+ # MEM_RESET_UNDO should only be called on an address range to which MEM_RESET
43
+ # was successfully applied earlier. It indicates that the data in the specified
44
+ # memory range specified by lpAddress and dwSize is of interest to the caller
45
+ # and attempts to reverse the effects of MEM_RESET. If the function succeeds,
46
+ # that means all data in the specified address range is intact. If the function
47
+ # fails, at least some of the data in the address range has been replaced with
48
+ # zeroes. This value cannot be used with any other value.
49
+ MEM_RESET_UNDO = 0x1000000
@@ -0,0 +1,90 @@
1
+ # -*- coding: utf-8 -*-
2
+ from enum import Enum
3
+
4
+
5
+ class MemoryProtectionsEnum(Enum):
6
+ """
7
+ Enum with all protections for a memory page.
8
+ """
9
+ # Enables execute access to the committed region of pages. An attempt to write to the committed
10
+ # region results in an access violation. This flag is not supported by the CreateFileMapping function.
11
+ PAGE_EXECUTE = 0x10
12
+
13
+ # Enables execute or read-only access to the committed region of pages. An attempt to write to the committed region
14
+ # results in an access violation. Windows Server 2003 and Windows XP: This attribute is not supported by the
15
+ # CreateFileMapping function until Windows XP with SP2 and Windows Server 2003 with SP1.
16
+ PAGE_EXECUTE_READ = 0x20
17
+
18
+ # Enables execute, read-only, or read/write access to the committed region of pages. Windows Server 2003 and
19
+ # Windows XP: This attribute is not supported by the CreateFileMapping function until Windows XP with SP2
20
+ # and Windows Server 2003 with SP1.
21
+ PAGE_EXECUTE_READWRITE = 0x40
22
+
23
+ # Enables execute, read-only, or copy-on-write access to a mapped view of a file mapping object. An attempt to
24
+ # write to a committed copy-on-write page results in a private copy of the page being made for the process. The
25
+ # private page is marked as PAGE_EXECUTE_READWRITE, and the change is written to the new page. This flag is not
26
+ # supported by the VirtualAlloc or VirtualAllocEx functions. Windows Vista, Windows Server 2003 and Windows XP:
27
+ # This attribute is not supported by the CreateFileMapping function until Windows Vista with SP1 and Windows Server 2008.
28
+ PAGE_EXECUTE_WRITECOPY = 0x80
29
+
30
+ # Pages in the region become guard pages. Any attempt to access a guard page causes the system to raise a
31
+ # STATUS_GUARD_PAGE_VIOLATION exception and turn off the guard page status. Guard pages thus act as a one-time access
32
+ # alarm. For more information, see Creating Guard Pages. When an access attempt leads the system to turn off guard page
33
+ # status, the underlying page protection takes over. If a guard page exception occurs during a system service, the
34
+ # service typically returns a failure status indicator. This value cannot be used with PAGE_NOACCESS. This flag is not
35
+ # supported by the CreateFileMapping function.
36
+ PAGE_GUARD = 0x100
37
+
38
+ # Disables all access to the committed region of pages. An attempt to read from, write to, or execute the committed
39
+ # region results in an access violation. This flag is not supported by the CreateFileMapping function.
40
+ PAGE_NOACCESS = 0x01
41
+
42
+ # Sets all pages to be non-cachable. Applications should not use this attribute except when explicitly required for a
43
+ # device. Using the interlocked functions with memory that is mapped with SEC_NOCACHE can result in an
44
+ # EXCEPTION_ILLEGAL_INSTRUCTION exception. The PAGE_NOCACHE flag cannot be used with the PAGE_GUARD, PAGE_NOACCESS, or
45
+ # PAGE_WRITECOMBINE flags. The PAGE_NOCACHE flag can be used only when allocating private memory with the VirtualAlloc,
46
+ # VirtualAllocEx, or VirtualAllocExNuma functions. To enable non-cached memory access for shared memory, specify the
47
+ # SEC_NOCACHE flag when calling the CreateFileMapping function.
48
+ PAGE_NOCACHE = 0x200
49
+
50
+ # Enables read-only access to the committed region of pages. An attempt to write to the committed region results in
51
+ # an access violation. If Data Execution Prevention is enabled, an attempt to execute code in the committed region
52
+ # results in an access violation.
53
+ PAGE_READONLY = 0x02
54
+
55
+ # Enables read-only or read/write access to the committed region of pages. If Data Execution Prevention is enabled,
56
+ # attempting to execute code in the committed region results in an access violation.
57
+ PAGE_READWRITE = 0x04
58
+
59
+ # Indicates memory page is readable. (Custom constant)
60
+ PAGE_READABLE = PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_READWRITE
61
+
62
+ # Sets all locations in the pages as invalid targets for CFG. Used along with any execute page protection like
63
+ # PAGE_EXECUTE, PAGE_EXECUTE_READ, PAGE_EXECUTE_READWRITE and PAGE_EXECUTE_WRITECOPY. Any indirect call to locations
64
+ # in those pages will fail CFG checks and the process will be terminated. The default behavior for executable pages
65
+ # allocated is to be marked valid call targets for CFG. This flag is not supported by the VirtualProtect or
66
+ # CreateFileMapping functions.
67
+ PAGE_TARGETS_INVALID = 0x40000000
68
+
69
+ # Pages in the region will not have their CFG information updated while the protection changes for VirtualProtect.
70
+ # For example, if the pages in the region was allocated using PAGE_TARGETS_INVALID, then the invalid information
71
+ # will be maintained while the page protection changes. This flag is only valid when the protection changes to an
72
+ # executable type like PAGE_EXECUTE, PAGE_EXECUTE_READ, PAGE_EXECUTE_READWRITE and PAGE_EXECUTE_WRITECOPY. The default
73
+ # behavior for VirtualProtect protection change to executable is to mark all locations as valid call targets for CFG.
74
+ PAGE_TARGETS_NO_UPDATE = 0x40000000
75
+
76
+ # Enables read-only or copy-on-write access to a mapped view of a file mapping object. An attempt to write to a
77
+ # committed copy-on-write page results in a private copy of the page being made for the process. The private page
78
+ # is marked as PAGE_READWRITE, and the change is written to the new page. If Data Execution Prevention is enabled,
79
+ # attempting to execute code in the committed region results in an access violation. This flag is not supported by
80
+ # the VirtualAlloc or VirtualAllocEx functions.
81
+ PAGE_WRITECOPY = 0x08
82
+
83
+ # Sets all pages to be write-combined. Applications should not use this attribute except when explicitly required for a
84
+ # device. Using the interlocked functions with memory that is mapped as write-combined can result in an
85
+ # EXCEPTION_ILLEGAL_INSTRUCTION exception. The PAGE_WRITECOMBINE flag cannot be specified with the PAGE_NOACCESS,
86
+ # PAGE_GUARD, and PAGE_NOCACHE flags. The PAGE_WRITECOMBINE flag can be used only when allocating private memory with
87
+ # the VirtualAlloc, VirtualAllocEx, or VirtualAllocExNuma functions. To enable write-combined memory access for shared
88
+ # memory, specify the SEC_WRITECOMBINE flag when calling the CreateFileMapping function. Windows Server 2003 and
89
+ # Windows XP: This flag is not supported until Windows Server 2003 with SP1.
90
+ PAGE_WRITECOMBINE = 0x400
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+ from enum import Enum
3
+
4
+
5
+ class MemoryTypesEnum(Enum):
6
+ """
7
+ Enum with all types of a memory page.
8
+ """
9
+ # Indicates that the memory pages within the region are mapped into the view of an image section.
10
+ MEM_IMAGE = 0x1000000
11
+
12
+ # Indicates that the memory pages within the region are mapped into the view of a section.
13
+ MEM_MAPPED = 0x40000
14
+
15
+ # Indicates that the memory pages within the region are private (that is, not shared by other processes).
16
+ MEM_PRIVATE = 0x20000
@@ -0,0 +1,58 @@
1
+ # -*- coding: utf-8 -*-
2
+ from enum import Enum
3
+
4
+
5
+ class ProcessOperationsEnum(Enum):
6
+ """
7
+ Enum with all permissions and operations you can do to a process.
8
+ """
9
+ # All possible access rights for a process object.Windows Server 2003 and Windows XP: The size of
10
+ # the PROCESS_ALL_ACCESS flag increased on Windows Server 2008 and Windows Vista. If an application
11
+ # compiled for Windows Server 2008 and Windows Vista is run on Windows Server 2003 or Windows XP,
12
+ # the PROCESS_ALL_ACCESS flag is too large and the function specifying this flag fails with
13
+ # ERROR_ACCESS_DENIED. To avoid this problem, specify the minimum set of access rights required for
14
+ # the operation. If PROCESS_ALL_ACCESS must be used, set _WIN32_WINNT to the minimum operating
15
+ # system targeted by your application (for example, #define _WIN32_WINNT _WIN32_WINNT_WINXP). For
16
+ # more information, see Using the Windows Headers.
17
+ PROCESS_ALL_ACCESS = 0x1f0fff
18
+
19
+ # Required to create a process.
20
+ PROCESS_CREATE_PROCESS = 0x0080
21
+
22
+ # Required to create a thread.
23
+ PROCESS_CREATE_THREAD = 0x0002
24
+
25
+ # Required to duplicate a handle using DuplicateHandle.
26
+ PROCESS_DUP_HANDLE = 0x0040
27
+
28
+ # Required to retrieve certain information about a process, such as its token, exit code, and priority
29
+ # class (see OpenProcessToken).
30
+ PROCESS_QUERY_INFORMATION = 0x0400
31
+
32
+ # Required to retrieve certain information about a process (see GetExitCodeProcess, GetPriorityClass,
33
+ # IsProcessInJob, QueryFullProcessImageName). A handle that has the PROCESS_QUERY_INFORMATION access right
34
+ # is automatically granted PROCESS_QUERY_LIMITED_INFORMATION.Windows Server 2003 and Windows XP: This
35
+ # access right is not supported.
36
+ PROCESS_QUERY_LIMITED_INFORMATION = 0x1000
37
+
38
+ # Required to set certain information about a process, such as its priority class (see SetPriorityClass).
39
+ PROCESS_SET_INFORMATION = 0x0200
40
+ PROCESS_SET_LIMITED_INFORMATION = 0x2000
41
+
42
+ # Required to set memory limits using SetProcessWorkingSetSize.
43
+ PROCESS_SET_QUOTA = 0x0100
44
+
45
+ # Required to suspend or resume a process.
46
+ PROCESS_SUSPEND_RESUME = 0x0800
47
+
48
+ # Required to terminate a process using TerminateProcess.
49
+ PROCESS_TERMINATE = 0x0800
50
+
51
+ # Required to perform an operation on the address space of a process (see VirtualProtectEx and WriteProcessMemory).
52
+ PROCESS_VM_OPERATION = 0x0008
53
+
54
+ # Required to read memory in a process using ReadProcessMemory.
55
+ PROCESS_VM_READ = 0x0010
56
+
57
+ # Required to write to memory in a process using WriteProcessMemory.
58
+ PROCESS_VM_WRITE = 0x0020
@@ -0,0 +1,26 @@
1
+ # -*- coding: utf-8 -*-
2
+ from enum import Enum
3
+
4
+
5
+ class StandardAccessRightsEnum(Enum):
6
+ """
7
+ Enum with of standard access rights that correspond to operations
8
+ common to most types of securable objects.
9
+ """
10
+ # Required to delete the object.
11
+ DELETE = 0x00010000
12
+
13
+ # Required to read information in the security descriptor for the object, not including the
14
+ # information in the SACL. To read or write the SACL, you must request the ACCESS_SYSTEM_SECURITY
15
+ # access right. For more information, see SACL Access Right.
16
+ READ_CONTROL = 0x00020000
17
+
18
+ # The right to use the object for synchronization. This enables a thread to wait until the object
19
+ # is in the signaled state.
20
+ SYNCHRONIZE = 0x00100000
21
+
22
+ # Required to modify the DACL in the security descriptor for the object.
23
+ WRITE_DAC = 0x00040000
24
+
25
+ # Required to change the owner in the security descriptor for the object.
26
+ WRITE_OWNER = 0x00080000
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyMemoryEditor
3
- Version: 1.4.6
3
+ Version: 1.4.7
4
4
  Summary: A Python library to edit and track memory of Windows processes (32 bits and 64 bits).
5
5
  Home-page: https://github.com/JeanExtreme002/PyMemoryEditor
6
6
  Author: Jean Loui Bernard Silva de Jesus
@@ -13,4 +13,10 @@ PyMemoryEditor/process/errors.py
13
13
  PyMemoryEditor/process/util.py
14
14
  PyMemoryEditor/win32/functions.py
15
15
  PyMemoryEditor/win32/types.py
16
- PyMemoryEditor/win32/util.py
16
+ PyMemoryEditor/win32/util.py
17
+ PyMemoryEditor/win32/enums/__init__.py
18
+ PyMemoryEditor/win32/enums/memory_allocation_states.py
19
+ PyMemoryEditor/win32/enums/memory_protections.py
20
+ PyMemoryEditor/win32/enums/memory_types.py
21
+ PyMemoryEditor/win32/enums/process_operations.py
22
+ PyMemoryEditor/win32/enums/standard_access_rights.py
@@ -16,7 +16,12 @@ setup(
16
16
  url = "https://github.com/JeanExtreme002/PyMemoryEditor",
17
17
  license = "MIT",
18
18
  keywords = "memory virtual writer reader read write override address pointer edit editor process win32 api cheat scan scanner debug trainer",
19
- packages = ["PyMemoryEditor", "PyMemoryEditor.process", "PyMemoryEditor.win32"],
19
+ packages = [
20
+ "PyMemoryEditor",
21
+ "PyMemoryEditor.process",
22
+ "PyMemoryEditor.win32",
23
+ "PyMemoryEditor.win32.enums"
24
+ ],
20
25
  install_requires = ["pywin32", "psutil"],
21
26
  classifiers = [
22
27
  "License :: OSI Approved :: MIT License",
File without changes
File without changes
File without changes