labatata101 / grep_bin Goto Github PK
View Code? Open in Web Editor NEWSearch a sequence of bytes in a binary file
License: MIT License
Search a sequence of bytes in a binary file
License: MIT License
When I run the cargo installed version, which on the surface seems to work as intended, I notice that it is not coloring every byte that matches my pattern. It seems to color every other byte that it finds that matches for the most part, but not exactly that behavior.
For example when I search for FF I see this, where bold are the colored finds:
02532170: 00 D2 7F 43 00 00 00 00 00 DB 7F 43 00 00 00 00 |...C.......C....|
025321A0: 00 D2 7F 43 00 00 00 00 00 DB 7F 43 00 00 00 00 |...C.......C....|
025321A0: 00 D2 7F 43 00 00 00 00 00 DB 7F 43 00 00 00 00 |...C.......C....|
025321D0: 00 DB 7F 43 00 00 00 00 00 E4 7F 43 00 00 00 00 |...C.......C....|
Notice that it is not exactly every other time. Perhaps every other one per line? Or perhaps it only colors one finding per line and ignores the rest but obviously its not the first one it finds
It looks like a great combo of the new and older versions but it still seems to skip occurrences. Have tested with 00, 01, 0F, 2E2E and noticed several occurrences in the output that don't get highlighted. I will take a look to see whats happening
Regardless of what binary I pass to the tool I get the following error:
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: Utf8Error { valid_up_to: 0, error_len: Some(1) }', src/utils.rs:41:48
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
I think 1.0.0 is a really nice tool that is close to perfect. I think making it color all of the findings will be an easy fix. Any chance I can get the source code? I'd like to fix it and then have what the functionality I need
Hello again. When I run using the usage you show in your documentation, the tool prints the usage:
So running this:
grep_bin -f test.bin -b fffe
Gives this:
error: Found argument '-b' which wasn't expected, or isn't valid in this context
USAGE:
grep_bin ... -f ...
For more information try --help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.