Skip to content

Commit

Permalink
Fix 'break' syscall (#1355)
Browse files Browse the repository at this point in the history
* Fix 'break' syscall

Fixed the 'break' syscall by renaming the method to break_ so as not to collide with the keyword.

* Bypass pypa/pip#6275
  • Loading branch information
Oshawk authored and Arusekk committed Oct 22, 2019
1 parent ecd6d23 commit 92e01a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ before_install:
install:
- pip install --upgrade pip
- pip install --upgrade appdirs # https://github.com/ActiveState/appdirs/issues/89#issuecomment-282326570
- python setup.py egg_info # pypa/pip#6275
- pip install --upgrade --editable .
- pip install --upgrade --requirement docs/requirements.txt
before_script:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import pwnlib.abi
import pwnlib.constants
import pwnlib.shellcraft
%>
<%docstring>break(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str
<%docstring>break_(vararg_0, vararg_1, vararg_2, vararg_3, vararg_4) -> str

Invokes the syscall break.

Expand Down Expand Up @@ -83,7 +83,7 @@ Returns:
else:
raise Exception("Could not locate any syscalls: %r" % syscalls)
%>
/* break(${', '.join(syscall_repr)}) */
/* break_(${', '.join(syscall_repr)}) */
%for name, arg in string_arguments.items():
${pwnlib.shellcraft.pushstr(arg, append_null=('\x00' not in arg))}
${pwnlib.shellcraft.mov(regs[argument_names.index(name)], abi.stack)}
Expand All @@ -95,4 +95,4 @@ Returns:
${pwnlib.shellcraft.push(arg)}
%endfor
${pwnlib.shellcraft.setregs(register_arguments)}
${pwnlib.shellcraft.syscall(syscall)}
${pwnlib.shellcraft.syscall(syscall)}

0 comments on commit 92e01a7

Please sign in to comment.