±Your Account
Membership:
New Today: 0
New Yesterday: 4
Overall: 24209
Visitors: 47±Latest Webinar
±Latest Articles
· Android Forensics
· Geo-tagging & Photo Tracking On iOS
· KS – an open source bash script for indexing data
· Mobile Device Geotags & Armed Forces
· Categorization of embedded system forensic collection methodologies
· Interpretation of NTFS Timestamps
· What are ‘gdocs’? Google Drive Data – part 2
· What are ‘gdocs’? Google Drive Data
· Bad Sector Recovery
· Forensic Artifact: Malware Analysis in Windows 8
· Geo-tagging & Photo Tracking On iOS
· KS – an open source bash script for indexing data
· Mobile Device Geotags & Armed Forces
· Categorization of embedded system forensic collection methodologies
· Interpretation of NTFS Timestamps
· What are ‘gdocs’? Google Drive Data – part 2
· What are ‘gdocs’? Google Drive Data
· Bad Sector Recovery
· Forensic Artifact: Malware Analysis in Windows 8
±Follow Us
±Latest Jobs
Back to top
Skip to content
Skip to menu
Back to top
Back to main
Skip to menu
Go to page 1, 2 Next
I second this! In the meantime, here's a quick and dirty python 2.x solution assuming your file content is something like this:
48656C6C6F20576F726C64
I had a quick look at doing it in EnScript, but to be honest I find EnScript to be an exercise in frustration with this sort of simple file content processing.
Batch file / Enscript - HEX to ASCII on multiple .txt files
Batch file / Enscript - HEX to ASCII on multiple .txt files
Posted: Thu Jan 24, 2013 4:44 pm
Hi,
I'm looking for a batch file or en-script which will convert all hex in a .txt into ascii. I've found one batch script online but it skips large portions of hex. Does anyone have one on hand?
Commercial or open source, all appreciated. Encase / ftk / winhex isnt much use, as it reads the hex as asci (as it should). Unless I'm missing a useful function in winhex (trial) to convert??
I'm looking for a batch file or en-script which will convert all hex in a .txt into ascii. I've found one batch script online but it skips large portions of hex. Does anyone have one on hand?
Commercial or open source, all appreciated. Encase / ftk / winhex isnt much use, as it reads the hex as asci (as it should). Unless I'm missing a useful function in winhex (trial) to convert??
-

research1 - Senior Member
Re: Batch file / Enscript - HEX to ASCII on multiple .txt fi
Posted: Thu Jan 24, 2013 5:12 pm
Maybe I am missing the point, but just opening the file in a text editor, Like Notepad, UltraEdit or many others will display a binary file as text. Of course many hex values are outside of the ASCII range, so there is no sensible way to display them. So you'll either get a lot of garbage characters, or a lot values skipped, depending on the tool and font in use.
I think your whole idea of *conversion* to ASCII doesn't make sense. ASCII is a just mapping of values in a file to symbols to characters.
The question would make sense, if it was a conversion from UTF-16 to ASCII. Or a conversion from EBCDIC to ASCII. Or maybe you mean something like converting ASCII HTML hex encoded character references to plain unencoded ASCII?
0x48 0x45 0x4c 0x4c 0x4f = HELLO
I think your whole idea of *conversion* to ASCII doesn't make sense. ASCII is a just mapping of values in a file to symbols to characters.
The question would make sense, if it was a conversion from UTF-16 to ASCII. Or a conversion from EBCDIC to ASCII. Or maybe you mean something like converting ASCII HTML hex encoded character references to plain unencoded ASCII?
0x48 0x45 0x4c 0x4c 0x4f = HELLO
-

Passmark - Senior Member
Re: Batch file / Enscript - HEX to ASCII on multiple .txt fi
Posted: Thu Jan 24, 2013 5:31 pm
Hi Passmark,
"ASCII HTML hex encoded character references to plain unencoded ASCII?" - Highly likely. The data was generated by a web-server.
"So you'll either get a lot of garbage characters, or a lot values skipped, depending on the tool and font in use." - Plenty of garbage characters.
I can decode the hex in web based converters, but I need something that can batch recursive on multiple .txt files.
"ASCII HTML hex encoded character references to plain unencoded ASCII?" - Highly likely. The data was generated by a web-server.
"So you'll either get a lot of garbage characters, or a lot values skipped, depending on the tool and font in use." - Plenty of garbage characters.
I can decode the hex in web based converters, but I need something that can batch recursive on multiple .txt files.
-

research1 - Senior Member
Re: Batch file / Enscript - HEX to ASCII on multiple .txt fi
Posted: Thu Jan 24, 2013 7:25 pm
Can you give an example of what the source file looks like (or a link to an example file)
-

Passmark - Senior Member
Re: Batch file / Enscript - HEX to ASCII on multiple .txt fi
Posted: Thu Jan 24, 2013 9:24 pm
Research1, do I understand that you have a text file that contains the following:
And you want to convert that into some one byte character set, e.g., ASCII. That's an interesting question.
Passmark, thanks for participating. And, umm, aren't you a famous rockstar?
_________________
Scott Tucker
Aptegra Consulting, LLC
www.aptegra.com
Code:
48:65:6c:6c:6f:20:77:6f:72:6c:64:21
And you want to convert that into some one byte character set, e.g., ASCII. That's an interesting question.
Passmark, thanks for participating. And, umm, aren't you a famous rockstar?
_________________
Scott Tucker
Aptegra Consulting, LLC
www.aptegra.com
-

TuckerHST - Senior Member
Re: Batch file / Enscript - HEX to ASCII on multiple .txt fi
Posted: Thu Jan 24, 2013 11:20 pm
Try this freeware,
www.gdargaud.net/Hack/...Ascii.html
(Disclaimer, I have never used it, but the screen shot looks like it might do what we are guessing you want done).
Only in my dreams.....
www.gdargaud.net/Hack/...Ascii.html
(Disclaimer, I have never used it, but the screen shot looks like it might do what we are guessing you want done).
...aren't you a famous rockstar?
Only in my dreams.....
-

Passmark - Senior Member
Re: Batch file / Enscript - HEX to ASCII on multiple .txt fi
Posted: Fri Jan 25, 2013 3:30 am
- PassmarkCan you give an example of what the source file looks like (or a link to an example file)
I second this! In the meantime, here's a quick and dirty python 2.x solution assuming your file content is something like this:
48656C6C6F20576F726C64
Code:
import binascii
hex_content = open("c:\\some\\path\\here\\file.txt").read()
ascii_string = binascii.a2b_hex(hex_content)
print ascii_string
hex_file.close()
I had a quick look at doing it in EnScript, but to be honest I find EnScript to be an exercise in frustration with this sort of simple file content processing.
-

Chris_Ed - Senior Member
















