sensalim Posted September 6, 2011 Share Posted September 6, 2011 (edited) I want to modify offset 0x58A81A to 0x3B1C of this binary file, but it writes "1C3B" instead. How do I do it? 2nd question: How do I make 0x58A81A a variable? (what kind of data type) (also would like to make 0x3B1C a variable, but that's same question as above) $modified_bin_fh = FileOpen($binary, 17) FileSetPos($modified_bin_fh, 0x58A81A, 0) FileWrite($modified_bin_fh, 0x3B1C) FileClose($modified_bin_fh) Thanks! Edit: I seem to have solved it $offset = Number("0x58A81A") $mod_to = Binary("0x3B1C") $modified_bin_fh = FileOpen($binary, 17) FileSetPos($modified_bin_fh, $offset, 0) FileWrite($modified_bin_fh, $mod_to) FileClose($modified_bin_fh) Any better suggestions? Edited September 6, 2011 by sensalim Link to comment Share on other sites More sharing options...
Zedna Posted September 6, 2011 Share Posted September 6, 2011 $offset = Number("0x58A81A") This should work too $offset = 0x58A81A You can use also WIN API functions, look at my example Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now