Vector35 / Vector35/binaryninja-api
[BUG/REQ] Remove all spaces when search hex-string
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.3k
- Forks
- 298
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 19
Description
If you copy a sequence of bytes from any hex editor, then if this sequence of bytes is long, it will most likely be copied with line breaks.
For example, in 010 Editor, all lines contain a maximum of 16 bytes by default, and if more are copied, the sequence is copied with line breaks. Here is an example:
E1 83 43 AD 01 01 01 AD E0 87 42 AD 00 05 00 AD
88 0A 40 B9 89 12 40 B9 8A 1A 40 B9 28 01 08 0B
08 01 0A 0B E9 1B 92 52 E9 9B AA 72 1F 01 09 6B
E8 17 9F 1A 09 7D 80 52 29 05 89 1A A9 02 00 B9
88 5E 00 B9 04 00 00
Problem:
If I insert such a sequence into the hex string search field, then line breaks are not visually displayed in it and the entire sequence is displayed as 1 long string. But when I click the "Find" button, I get an error "Odd number of hex digits specified."
This is due to the fact that line breaks are present but not displayed.
If you manually remove line breaks in a text editor and copy the hex string sequence in one long line and perform a search, there will be no problems. But this is unnecessary manual processing!
In my opinion, the obvious solution would be the following:
- After clicking the "Find" button, the entire line should be processed - all types of spaces, indents and line breaks should be removed, then the number of characters should be counted so that their number is even, and then splitting into pairs of characters and converting to bytes.
- It would also be convenient if the hex string insertion field could be scaled (that is, stretched down like a window, because you often have to look for large hex patterns and it is more convenient to visually check or correct them in the input field, rather than using a text editor as an intermediate link)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue from the hex-string search field: paste the multiline byte sequence and use the Find button. The payload names no files or tests, so locate the search-field handling and its sizing behavior first; done means multiline input searches successfully without manual cleanup and the requested field resizing is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- search
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100