Results 1 to 11 of 11

Thread: Convert Binary(?) to Text

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Convert Binary(?) to Text

    How do I convert this file (Attached) to a readable text file (its XML code)

    I found code here and there but doesnt work. I want to grab the whole file and dump it back out as readable text.

    Thanks!
    Attached Files Attached Files
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Convert Binary(?) to Text

    Get a Hex editor and use it to open the file... You can then examine the contents to see if it's convertible to readable xml. I tried it found some parts are readable, other parts are just garbage. Is it encrypted?
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  3. #3
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Convert Binary(?) to Text

    It seems to be a file containing binary data which can not entirely be interpreted as text.
    It contains null bytes, among other non-printable characters. Where did you get this file from?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Convert Binary(?) to Text

    if it really is XML, it should already be in text format... that's the point of XML .... unless as stanav mention, it's been encrypted... in which case, you'll need the accompanying decryption method and keys to get it back.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Convert Binary(?) to Text

    Took a look at it.... it appears to be a C string resource file.... not an XML file....

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Convert Binary(?) to Text

    its actually an Ipod Touch 2.2.1 "strings" file
    its styled like XML and reads like xml when converted...
    it comes right off the touch like that.

    after converted it will look like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>ACCEPT</key>
    <string>Accept</string>
    <key>AFTER_CLTM_SHUTDOWN_BODY</key>
    <string>iPhone shut down due to temperature.</string>
    <key>AIRPLANE_CELL_PROMPT</key>
    <string>You must disable airplane mode to access data.</string>
    <key>AIRPLANE_CELL_PROMPT_SMS</key>
    <string>You must disable airplane mode to send or receive text messages.</string>
    <key>AIRPLANE_DATA_OK</key>
    <string>OK</string>
    <key>AIRPLANE_DATA_PROMPT</key>
    <string>Turn off Airplane Mode or use Wi-Fi to access data</string>
    <key>AIRPLANE_DATA_SETTINGS</key>
    <string>Settings</string>
    <key>ALARM</key>
    <string>Alarm</string>
    <key>ALARM_LOCK_LABEL</key>
    <string>slide to stop alarm</string>
    <key>ALARM_OK</key>
    <string>OK</string>
    <key>ALARM_SNOOZE</key>
    <string>Snooze</string>
    etc etc

    people have done this before... but all links o the converter used are dead. it was an online converted. Im guessing that anything that is not readable should be ignored?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  7. #7
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Convert Binary(?) to Text

    If this is some sort of Ipod file...there must be some documentation on the format of these files that you can use to write your own converter.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  8. #8
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Convert Binary(?) to Text

    It's not an xml file.... it can be converted into an xml file... but it is not inherently an xml file. It is a string resource file. I've seen similar formats in C string resource files before. As a side note... that seems like a horrible format for key/value pairs.... it's relying heavily on being red in order and that nothing goes wrong with it when being created or read back.... but that might be just me.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  9. #9

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Convert Binary(?) to Text

    of course its horrible.. its APPLE! lol
    and yeah, it probably is a C file. it is designed to be read in order, just once.

    Once its loaded into memory.. doesnt matter

    I just need to converted into a regular text file
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  10. #10

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Convert Binary(?) to Text

    ok, so how can i do this?

    Can i just convert what can be converted and ignore the rest?

    wait... does this help anyone?


    I found a site that does this online....

    i uploaded the file clicked convert and this is what it says:

    converting...
    BinaryToXML:
    Offsets are 2 bytes
    Object Refs are 2 bytes
    There are 588 objects in the file
    The top object is at 0
    The Offset Table is at offset 17128

    Int Lengths = 776
    Misc Lengths = 1
    String Lengths = 15055
    Unique Strings = 587
    Last edited by Static; Mar 18th, 2009 at 11:30 AM.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  11. #11
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Convert Binary(?) to Text

    In order to get the data you want, you'll probably have to parse the file. Here is a java implementation, maybe that can get you started:

    http://www.java2s.com/Open-Source/Ja...arser.java.htm

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