Join Us!

Binary File Maker t...
 
Notifications
Clear all

Binary File Maker tool  

  RSS
pwakely
(@pwakely)
Junior Member

Hi,

I needed to create a large number of test binary files recently, but needed to keep readable versions with comments as well as the binaries. Having had this requirement several times before, rather than creating another custom script/program I wrote a small generic utility with a minimal gui to convert text files containing hex values and comments (ignored during conversion) to binary files, and in case anyone else might find it useful, I decided to make it freely available (here).

It's very simple and hopefully should "just work" for anyone who wants to try it - if you do, I'd appreciate any feedback on issues or comments, either direct to me or on the forum.

Cheers,

Phil.

Quote
Posted : 30/10/2009 3:15 pm
jaclaz
(@jaclaz)
Community Legend

First thing )
Nice idea and tool, it may come useful for avoiding "double" files, i.e. a commented hex dump + the actual hex may become simply the "commented hex" and one could change modify it AND rebuild the hex.

Second thing 😯 x
It is NOT "Free", it is "Free, BUT registration required" or "You pay it by giving me your name, company and e-mail address".

jaclaz

ReplyQuote
Posted : 31/10/2009 2:37 pm
pwakely
(@pwakely)
Junior Member

I have PM'd you a direct link so you can avoid the form submission, and will be happy to do the same for anyone else on request.

Phil.

ReplyQuote
Posted : 31/10/2009 8:28 pm
trewmte
(@trewmte)
Community Legend

Phil I have registered for a copy because I don't mind you knowing that I want to try the tool to see how it works.

ReplyQuote
Posted : 31/10/2009 9:07 pm
jaclaz
(@jaclaz)
Community Legend

@pwakely
Thanks for the direct link ) , but probably I failed to explain fully the point I was trying to make.

You have all the rights in the world to ask for the User name and e-mail before giving the download link.

It is your intellectual property and your work, it is entirely up to you to decide how to distribute it.

As well, I have no problems whatever in giving you my name and e-mail.

Point was that the "freely available" doesn't fit to the distribution method you chose. wink

jaclaz

ReplyQuote
Posted : 31/10/2009 10:42 pm
jaclaz
(@jaclaz)
Community Legend

Well, I find the idea so nice ) that I simply had to "copy" it in a command line thingy, useful for the few remaining dinosaurs around.

It should behave exactly like the original utility BUT the % (percent) sign is NOT allowed as "comment symbol".

The batch is pretty much unreadable, as after making a "normal" one, I saw it was around 1,300 bytes, so I decided to go all the way down and make it fit in 1,024 bytes wink.

Filenames with spaces are not allowed in this version.

If anyone is interested I can post the "full" version, that is much more readable and can be easily tweaked to add "filenames with spaces" or some other feature.

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
SET E=ECHO
SET S=%~dpnx1
SET T=%~dpn1.bin
SET Z=GOTO EOF
IF NOT DEFINED S %E% %~nx0 - Batch Convert Hex to Bin&%E% by jaclaz from an idea by pwakely on ForensicFocus Forums&PAUSE
IF EXIST %T% DEL %T%
For /F "tokens=1 delims=" %%? IN (%S%) DO (
SET L="%%?"
SET F=!L~1,1!
CALL Do_L !L!
)
IF EXIST e.com del e.com
%Z%
Do_L
IF NOT EXIST e.com (
%E% [email protected]`0X-`/PPPPPPa(DE(DM(DO(Dh(Ls(Lu(LX(LeZRR]EEEUYRX2Dx=
%E% 0DxFP,0Xx.t0P,[email protected]$?PIyU WwX0GwUY Wv;ovBX2Gv0ExGIuht6
%E% [email protected]@=a?}VjuN?_LEkS?`w`s_{OCIvJDGEHtc{OCIKGMgELCI?GGg
%E% EL?s?WL`LRBcx=k_K?AxVD?fCo?Cd?BLDs0
)>>e.com
IF "!F!"==";" %Z%
IF "!F!"=="/" %Z%
IF "!F!"=="#" %Z%
For /F "tokens=1 delims=/;#" %%A IN (%1) DO (
SET H="%%A"
SET H=!H =!
SET H=!H =!
CALL A$ !H!
IF NOT !H!==$ %E% !H!&e.com !H!>>%T%
)
%Z%
A$
SET H=$%~1
SET /A P=3
P_l
SET P_c=!H~%P%,1!
IF "!P_c!"=="" GOTO EOF
IF NOT "!P_c!"=="$" SET H=!H~0,%P%!$!H~%P%,100!
SET /A P+=3
GOTO P_l

jaclaz

ReplyQuote
Posted : 03/11/2009 2:44 pm
pwakely
(@pwakely)
Junior Member

nicely done (and thank you for the acknowledgement); I have done similar under linux/unix (I also qualify for dinosaur status) but tend to avoid DOS scripting where I can o Only the Matlab users won't like the loss of the '%' - probably not a high percentage of membership on here 😉

Phil.

ReplyQuote
Posted : 04/11/2009 3:07 pm
Share: