Skip to content

Commit

Permalink
Fix incorrect ordering in template for non-ssh remotes (#968)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachriggle committed May 2, 2017
1 parent 42692c6 commit f4b3469
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pwnlib/data/templates/pwnup.mako
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ def remote(argv=[], *a, **kw):
else:
return shell.process([remote_path] + argv, *a, **kw)
%else:
return connect(host, port)
io = connect(host, port)
if args.GDB:
gdb.attach(io, gdbscript=gdbscript)
return io
%endif
%endif

Expand All @@ -119,11 +122,6 @@ def start(argv=[], *a, **kw):
io = process([${binary_repr}] + argv, *a, **kw)
%endif

%if host and not ssh:
if args.GDB and not args.LOCAL:
gdb.attach(io, gdbscript=gdbscript)
%endif

#===========================================================
# EXPLOIT GOES HERE
#===========================================================
Expand Down

0 comments on commit f4b3469

Please sign in to comment.