Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--regex support for search-pattern command #860

Merged
merged 1 commit into from Jul 2, 2022
Merged

--regex support for search-pattern command #860

merged 1 commit into from Jul 2, 2022

Conversation

therealdreg
Copy link
Sponsor Collaborator

@therealdreg therealdreg commented Jul 1, 2022

Description/Motivation/Screenshots

search-pattern --regex 0x401000 0x401500 ([\\x20-\\x7E]{2,})(?=\\x00)   

It matchs null-end-printable(from x20-x7e) C strings (min size >=2 bytes)

newf

x86_64 binary POC:

poc.zip

Against which architecture was this tested ?

"Tested" indicates that the PR works and the unit test (i.e. make test) run passes without issue.

  • x86-32
  • x86-64
  • ARM
  • AARCH64
  • MIPS
  • POWERPC
  • SPARC
  • RISC-V

Checklist

  • My PR was done against the dev branch, not main.
  • My code follows the code style of this project.
  • My change includes a change to the documentation, if required.
  • If my change adds new code, adequate tests have been added.
  • I have read and agree to the CONTRIBUTING document.

@hugsy
Copy link
Owner

hugsy commented Jul 1, 2022

It's missing tests and docs

@therealdreg
Copy link
Sponsor Collaborator Author

therealdreg commented Jul 2, 2022

doc & test added, @hugsy can you review it? thx!

gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
gef.py Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
@therealdreg therealdreg requested a review from hugsy July 2, 2022 15:57
Copy link
Owner

@hugsy hugsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one slight optimization and we're good. You should be able to just commit it directly if you agree.

gef.py Show resolved Hide resolved
gef.py Outdated Show resolved Hide resolved
@therealdreg therealdreg requested a review from hugsy July 2, 2022 18:28
@therealdreg
Copy link
Sponsor Collaborator Author

All suggestions added! as always, thx for your patience

@hugsy hugsy merged commit 35c115a into hugsy:dev Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants