You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,31 +50,31 @@ You can also make some operation on threads (suspend/resume/wait/get(or set) con
50
50
32
51
51
>>> windows.current_process.token.integrity
52
52
SECURITY_MANDATORY_MEDIUM_RID(0x2000L)
53
-
>>>calc= [p for p in windows.system.processes if p.name =="calc.exe"][0]
54
-
>>>calc
55
-
<WinProcess "calc.exe" pid 6960 at 0x37391f0>
56
-
>>>calc.bitness
53
+
>>>proc= [p for p in windows.system.processes if p.name =="notepad.exe"][0]
54
+
>>>proc
55
+
<WinProcess "notepad.exe" pid 16520 at 0x544e410>
56
+
>>>proc.bitness
57
57
64
58
-
>>>calc.peb.modules[:3]
59
-
[<RemoteLoadedModule64 "calc.exe" at 0x3671e90>, <RemoteLoadedModule64 "ntdll.dll" at 0x3671030>, <RemoteLoadedModule64 "kernel32.dll" at 0x3671080>]
60
-
>>> k32 =calc.peb.modules[2]
58
+
>>>proc.peb.modules[:3]
59
+
[<RemoteLoadedModule64 "notepad.exe" at 0x3671e90>, <RemoteLoadedModule64 "ntdll.dll" at 0x3671030>, <RemoteLoadedModule64 "kernel32.dll" at 0x3671080>]
60
+
>>> k32 =proc.peb.modules[2]
61
61
>>>hex(k32.pe.exports["CreateFileW"])
62
62
'0x7ffee6761550L'
63
-
>>>calc.threads[0]
64
-
<WinThread 3932 owner "calc.exe" at 0x3646350>
65
-
>>>hex(calc.threads[0].context.Rip)
63
+
>>>proc.threads[0]
64
+
<WinThread 17688 owner "notepad.exe" at 0x53b47f0>
65
+
>>>hex(proc.threads[0].context.Rip)
66
66
'0x7ffee68b54b0L'
67
-
>>>calc.execute_python("import os")
67
+
>>>proc.execute_python("import os")
68
68
True
69
-
>>>calc.execute_python("exit(os.getpid() + 1)")
69
+
>>>proc.execute_python("exit(os.getpid() + 1)")
70
70
# execute_python raise if process died
71
71
Traceback (most recent call last):
72
72
...
73
-
WindowsError: <WinProcess "calc.exe" pid 6960 (DEAD) at 0x37391f0> died during execution of python command
73
+
WindowsError: <WinProcess "notepad.exe" pid 16520 (DEAD) at 0x579f610> died during execution of python command
74
74
>>> calc
75
-
<WinProcess "calc.exe" pid 6960 (DEAD) at 0x37391f0>
75
+
<WinProcess "notepad.exe" pid 16520 (DEAD) at 0x579f610>
76
76
>>> calc.exit_code
77
-
6961L
77
+
16521L
78
78
```
79
79
80
80
### System information
@@ -126,7 +126,7 @@ but some have default values and the functions raise exception on call error (I
126
126
# Help on function VirtualAlloc in module windows.winproxy:
[<WmiObject instance of "Win32_Process">, <WmiObject instance of "Win32_Process">, <WmiObject instance of "Win32_Process">]# Get WMI data for current process
0 commit comments