Aug-12-2023, 05:56 PM
Hi all
I` d like to search a file for multiple unknown hex combinations in a file and have absolutely no idea how to start.
The hex combinations are always 3 byte long and the second and third byte will have different unknown values.
What i know is that the initial combinations to search start with one of the following
8c , 8d , 8e
so ac???? or 8d???? 8e????
Now i want to return the ???? values only if there is also one or multiple ac???? or 8d???? 8e???? or ee???? or ce???? in that file aswell.
For example if 8c21d0 is found anywhere in that file then seach for a second,third... 8c21d0 and also for
ee21d0 8d21d0 8e21d0 ce21d0
Once that is found i`d like to skip returning values if the found bytes match e.g. 8d 12 d0 or 8d 22 d0 or 8d 00 04 etc.
I think to store the skip values in an list is the best solution here.
If the 2nd and third byte is not in that skiplist the function should return 21d0 in that case as first found combinations, but
continue searching for other possible matches and return them aswell.
What would be the best solution / funtion to start such a Project ?
I` d like to search a file for multiple unknown hex combinations in a file and have absolutely no idea how to start.
The hex combinations are always 3 byte long and the second and third byte will have different unknown values.
What i know is that the initial combinations to search start with one of the following
8c , 8d , 8e
so ac???? or 8d???? 8e????
Now i want to return the ???? values only if there is also one or multiple ac???? or 8d???? 8e???? or ee???? or ce???? in that file aswell.
For example if 8c21d0 is found anywhere in that file then seach for a second,third... 8c21d0 and also for
ee21d0 8d21d0 8e21d0 ce21d0
Once that is found i`d like to skip returning values if the found bytes match e.g. 8d 12 d0 or 8d 22 d0 or 8d 00 04 etc.
I think to store the skip values in an list is the best solution here.
If the 2nd and third byte is not in that skiplist the function should return 21d0 in that case as first found combinations, but
continue searching for other possible matches and return them aswell.
What would be the best solution / funtion to start such a Project ?