Results 1 to 5 of 5

Thread: Need help with editing Binary files...HELP!!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2

    Unhappy

    Basically i have made a small program that uses the Replace function to search for a specified string and replace it with whatever i choose from a binary file..i'm just having problems replacing non string characters...In the
    Replace(variable, "string", "different string")
    string will be replacd with different string..but what if i want the value 00 in hex (which can't be typed instead of string beacuse i don't know how..is there an ascii character for 00 hex value?) to be replaced with 2E (full stop)...what do i need to do? help!

    TiCaL





  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    To use hex values, prefix the hex value with &H, so 255 in hex is &HFF.

    You don't have to work with hex though, just convert your hex to decimal - 2F in hex = 47 in decimal.
    Harry.

    "From one thing, know ten thousand things."

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2

    Unhappy I knew that but...

    Let's say i wanna search for a hex value 006865782D737472696E6700 (which is equal to .hex-value. . is a 00) and replace it with 000000000000000000000000..?

    00 are important? how do i do that?

    PLEASE HELP

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I see. Why don't you just add a "00" to the string you're replacing the hex value with for each byte in your hex value? Make sense? Maybe I missed something.
    Harry.

    "From one thing, know ten thousand things."

  5. #5
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    Have a search on planet-source-code.com, theres a really good hex editro just been posted.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width