Replies: 2 comments 20 replies
-
You could try something like this:
The structure is placed at 0, searches for the address of the first occurrence of the byte sequence 0x15 0xa0 and gets the address. Sets the cursor to that address and then places the id, len, and data array accordingly. If you don't want to set the cursor, then you could place the three items in the structure explicitly instead.
The first approach will give you an hdt pattern which starts at 0 and has a length that takes it to the end of the data array. The second approach will give you an hdt patter which starts at 0 and ends at 0, but the component parts are still in the correct places. |
Beta Was this translation helpful? Give feedback.
-
I didn't see different error. Only this. Thank you, anyway! Is it possible to import "Highlighting rules"? |
Beta Was this translation helpful? Give feedback.
-
Hello!
First of all, I what to say thank say thanks to creator of this editor. This is best hex editor I have find.
I feel the power, but falls with create my pattern code. :)
My task is find in binary data something that starts with 0xa015 (16b LE)(id) next 2 byte is length and next is (16b data * length) and colorize that and only that.
So i try to create the pattern code:
`
struct hdt {
u16 id;
if (id == 0xA015) {
u16 len;
u16 data[len];
}
}
hdt data[while (!std::mem::eof())] @ 0x0
`
And I've got pattern data every 2 byte and beautiful color, but not there i need it to be. It's even better than other hex editors, but I understand that it can do more. :)
If it were python, i have to open file for read, and in for loop find(if) needed byte seq, then save it to list, tuple or whatever.
I check the existed patterns and documentation, try find something in google but didn't understand the logic of this script language.
My main misunderstanding is how to process data without creating struct.
I can't find docs and tutorials other than official.
It was first step, on next step, that i need to change code to find more than 1000 different named ID's. But first things fist.
Can I import "Highlighting rules"? I find this rules in project file, but didn't find import/export function.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions