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

Add argument to invert query endianess #11

Open
cirosantilli opened this issue Jun 26, 2017 · 1 comment
Open

Add argument to invert query endianess #11

cirosantilli opened this issue Jun 26, 2017 · 1 comment

Comments

@cirosantilli
Copy link

E.g.:

bgrep -i 4 0102030405060708

would invert endianess and be equivalent to:

bgrep 00403020108070605

The magic case -i 0 could invert the entire string to: 0807060504030201.

@tmbinc
Copy link
Owner

tmbinc commented Feb 21, 2021

I think searching for numbers is an intriguing enough use-case to justify special treatment, however such an "-i" option has corner cases (non-multiple search string length) that makes the behavior a bit non-obvious.

I wonder if we should instead support something like "-i ", which adds "number" to the search string, and be something like {B,H,I,Q}, possible with a prefix to indicate endianness. We could then support multiple search strings (which are concatenated), so one could search for

bgrep -iI 0x12345 -iI 0x5678 

but also

bgrep -iI 0x12345 08070605

etc.

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

No branches or pull requests

2 participants