-
December 18th, 2010, 04:42 AM
#1
[RESOLVED] Comparision
I have a database of hexadecimal lists like
"12 A2 3E BB DC 5E AD C7 00 ?? A2 00 EE ?? C3 55 90"
there are ??(two question marks) for unknown value
I have to compare the lists in database with a list of actual hex values read from an executable file. There are no question marks in these hex values read, instead there is an hex value
I am trying to find the efficient way to compare these two lists.
One way I thought of is to make binary search trees of the two lists but the problem with this solution is how do I treat "??" in the first list.
or help me with another "efficient" way.
Any help is appreciated.
-
December 18th, 2010, 06:24 AM
#2
Re: Comparision
Originally Posted by aquarianutsav
I have a database of hexadecimal lists like
"12 A2 3E BB DC 5E AD C7 00 ?? A2 00 EE ?? C3 55 90"
there are ??(two question marks) for unknown value
What is a data type of this field in the database?
Where do you "see" this double-question-mark?
Victor Nijegorodov
-
December 18th, 2010, 06:55 AM
#3
Re: Comparision
with database i meant ini file.
that ini file has more than 5000 sections and in each section there is this list which is the value of key "signature"
i have to compare this signature with the signature ot the exe file and find the type of exe file.
-
December 18th, 2010, 07:00 AM
#4
Re: Comparision
for example :
[!EP (ExE Pack) V1.0 -> Elite Coding Group]
signature = 60 68 54 ?? ?? ?? B8 48 ?? ?? ?? FF
ep_only = true
[Nullsoft Install System v1.98]
signature = 83 EC 0C 53 56 57 FF 15 2C 81 40
ep_only = true
[Nullsoft Install System v1.xx]
signature = 50 53 51 52 1E 06 9C B8 21 35 CD 21 53 BB ?? ?? 26 ?? ?? 49 48 5B
ep_only = true
[Zortech C]
signature = E8 ?? ?? 2E FF ?? ?? ?? FC 06
ep_only = true
-
December 18th, 2010, 06:43 PM
#5
Re: Comparision
make a regex for each type. map from the regex/type onto all the read values that match the regex.
60 60 54 [0-9a-fA-F]{2} [0-9a-fA-F]{2} [0-9a-fA-F]{2} b8 48 ...
-
December 20th, 2010, 05:59 AM
#6
Re: Comparision
The time taken in reading the values of keys of around 5500 sections is 16 seconds and it takes only a second to make 5500 maps from the values read.
How do I reduce the time taken to read the file?
-
December 20th, 2010, 12:03 PM
#7
Re: Comparision
How are you reading it now?
-
December 21st, 2010, 03:03 AM
#8
Re: Comparision
previously I was reading it using GetPrivateProfileString and GetPrivateProfileSectionNames.
Now I am using 'fread' and it has solved the purpose.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|