Jump to content
Sign in to follow this  
Lammer

Exemple Hex Dump (Scan)

Recommended Posts

Lammer

Good evening.

good, I'm working on a new software.

But I have a little trouble in a dump function

What do they need to do exactly?

I need it to detect a certain component or string or offset or passage in the dump.

say, a small example:

Create a program that contains a string name $StringExemple

I need a function in AU3, looking me and tell me if there is a string ($StringExemple) through binary scan or better known as hex dump.

If it is not too much to ask, would a small example of this idea.

My heartfelt thanks and hopefully answer.

Edited by Lammer

Share this post


Link to post
Share on other sites
Jury

Perhaps your answer is somewhere in here:

#include <String.au3>
$text = 'car boot sale is in here$StringExempleand also here: $StringExemple'
$text2 = _StringToHex($text)
$find = '$StringExemple'
$find = _StringToHex($find)
$findHex = StringRegExpReplace($find, ".{2}", '\\x$0')
;so this is now: $findHex = '\x24\x53\x74\x72\x69\x6E\x67\x45\x78\x65\x6D\x70\x6C\x65'
$array = StringRegExp($text, $findHex, 3)
For $i = 0 To UBound($array) - 1
 MsgBox(0, "RegExp Test with Option 3 - " & $i + 1, $array[$i])
Next
;searchdump found in textdump:
$array = StringRegExp($text2, $find, 3)
For $i = 0 To UBound($array) - 1
 MsgBox(0, "RegExp Test with Option 3 - " & $i + 1, $array[$i] &'  or  '& _HexToString($array[$i]))
Next

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×