Files
crazy hugsy 7c170cf6be Setup pre-commit for GEF (#984)
This PR adds `pre-commit` to facilitate and unify the formatting of
everything in this project (code, test, docs, ci).

Aside from `.pre-commit-config.yml` and `docs/.markdownlint.yaml`, all
the other changes are purely cosmetic, applying markdownlint and fixing
here and there to make it pass.

It also creates a new CI job that'll simply execute `pre-commit` for new
PRs.
2023-08-07 16:36:33 -07:00

476 B

Command patch

patch lets you easily patch the specified values to the specified address.

gef➤ patch byte $eip 0x90
gef➤ patch string $eip "cool!"

These commands copy the first 10 bytes of $rsp+8 to $rip:

gef➤  print-format --lang bytearray -l 10 $rsp+8
Saved data b'\xcb\xe3\xff\xff\xff\x7f\x00\x00\x00\x00'... in '$_gef0'
gef➤  patch byte $rip $_gef0

Very handy to copy-paste-execute shellcodes/data from different memory regions.