Skip to content

Commit 40c1ef5

Browse files
authored
Do not overwrite global bytes in examples (Gallopsled#2240)
1 parent e5af2bc commit 40c1ef5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pwnlib/runner.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ def run_shellcode(bytes, **kw):
3939
4040
Example:
4141
42-
>>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
43-
>>> p = run_shellcode(bytes)
42+
>>> insn_bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
43+
>>> p = run_shellcode(insn_bytes)
4444
>>> p.wait_for_close()
4545
>>> p.poll()
4646
3
4747
48-
>>> bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')
49-
>>> p = run_shellcode(bytes, arch='arm')
48+
>>> insn_bytes = asm('mov r0, #12; mov r7, #1; svc #0', arch='arm')
49+
>>> p = run_shellcode(insn_bytes, arch='arm')
5050
>>> p.wait_for_close()
5151
>>> p.poll()
5252
12
@@ -84,8 +84,8 @@ def run_shellcode_exitcode(bytes):
8484
8585
Example:
8686
87-
>>> bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
88-
>>> run_shellcode_exitcode(bytes)
87+
>>> insn_bytes = asm('mov ebx, 3; mov eax, SYS_exit; int 0x80;')
88+
>>> run_shellcode_exitcode(insn_bytes)
8989
3
9090
"""
9191
p = run_shellcode(bytes)

0 commit comments

Comments
 (0)