Skip to content

Commit

Permalink
More output for the payload function
Browse files Browse the repository at this point in the history
- The current payload silently fails when there is no copy function
- Added two warnings to explain the failure
  • Loading branch information
awailly committed Mar 17, 2015
1 parent 8c831be commit 493c718
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions peda.py
Original file line number Diff line number Diff line change
Expand Up @@ -2859,13 +2859,15 @@ def payload_copybytes(self, target=None, data=None, template=0):
transfer = f
break
if transfer == "":
warning_msg("No copy function available")
return None

headers = self.elfheader()
start = min([v[0] for (k, v) in headers.items() if v[0] > 0])
end = max([v[1] for (k, v) in headers.items() if v[2] != "data"])
symbols = self.elfsymbol(transfer)
if not symbols:
warning_msg("Unable to find symbols")
return None

plt_func = transfer + "_plt"
Expand Down

0 comments on commit 493c718

Please sign in to comment.