Page 1 of 3

Bhx 3.1

Posted: 20 Dec 2012 23:07
by carlos
This version was deprecated because bugs and the latest version is found here:
http://www.dostips.com/forum/viewtopic.php?f=3&t=6400

Re: [utility] Bhx 2.0

Posted: 09 Jan 2013 18:31
by carlos
Posted version 2.0.

Re: [utility] Bhx 2.0

Posted: 10 Jan 2013 06:43
by abc0502
Nice Tool, and thanks for the new features too.
BTW, It can convert a dll files too :o without any errors and the re-generated files is the same, i checked the md5 hash. i think now we can convert a complete application and re-generate it again using a batch file :)

Re: [utility] Bhx 2.1

Posted: 04 Jan 2014 22:19
by carlos
Hello. I posted the version 2.1. I hope you find it useful. :)

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 08:49
by Squashman
Still have not figured out what to use this utility for.

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 13:59
by carlos
Squashman wrote:Still have not figured out what to use this utility for.

With it you can rebuild a binary file that you need:
For example: the image in Wikipedia Sokoban article:
download it from:

Code: Select all

http://upload.wikimedia.org/wikipedia/en/4/4b/Sokoban_ani.gif

to folder c:\examples:

look the size of the file:

Code: Select all

C:\examples>dir
05-01-2014  16:34            21.547 Sokoban_ani.gif


reduce the file size from 21547 to 12210 bytes (making a cabinet file with extension like this .??_):

Code: Select all

C:\examples>makecab Sokoban_ani.gif
Cabinet Maker - Lossless Data Compression Tool
100.00% [flushing current folder]

C:\examples>dir
05-01-2014  16:34            21.547 Sokoban_ani.gif
05-01-2014  16:42            12.210 Sokoban_ani.gi_


make the rebuilder script:

Code: Select all

C:\examples>bhx Sokoban_ani.gi_
"mybin.cmd" generated.


delete the cabinet file:

Code: Select all

C:\examples>del Sokoban_ani.gi_


rename the original image for compare later:

Code: Select all

C:\examples>ren Sokoban_ani.gif Sokoban_ani.gif.bak


look the files in the folder:

Code: Select all

C:\examples>dir
05-01-2014  16:42            28.717 mybin.cmd
05-01-2014  16:34            21.547 Sokoban_ani.gif.bak


do the rebuild:

Code: Select all

C:\examples>mybin.cmd


look if the file was rebuilded:

Code: Select all

C:\examples>dir
05-01-2014  16:42            28.717 mybin.cmd
05-01-2014  16:34            21.547 Sokoban_ani.gif
05-01-2014  16:34            21.547 Sokoban_ani.gif.bak


do a binary comparision:

Code: Select all

C:\examples>fc /b Sokoban_ani.gif Sokoban_ani.gif.bak
Comparing files Sokoban_ani.gif and SOKOBAN_ANI.GIF.BAK
FC: no differences encountered

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 14:27
by Squashman
What I meant was I was trying to figure out a real world example to use the utility in my daily job. Guess I am not really understanding the purpose of the utility. Compressing a gif and umcompressing it really doesn't make much sense to me.

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 15:02
by npocmaka_
you can create an executables with a .bat and put all your script logic (including the exe file or whatever you want) within a single file.Eventually you can also avoid a security constraints of an antivirus/security settings/...

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 16:30
by foxidrive
A benefit is that you can include a binary in your batch file, without needing the OP to download it.

You paste in the reconstruction code as a subroutine, and it recreates the executable, or whatever file you need.

npocmaka beat me...

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 18:46
by carlos
@npocmaka_, @foxidrive: thanks for the help with the explications.

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 19:08
by Squashman
foxidrive wrote:A benefit is that you can include a binary in your batch file, without needing the OP to download it.

You paste in the reconstruction code as a subroutine, and it recreates the executable, or whatever file you need.

npocmaka beat me...

Thought that was hex to bin utility was used for?
So you are saying if I wanted to distribute a batch file with Native SED code I could put it into the batch file without having to distribute SED with my batch file or tell the user they need to download SED to use it?

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 19:51
by foxidrive
Squashman wrote:Thought that was hex to bin utility was used for?
So you are saying if I wanted to distribute a batch file with Native SED code I could put it into the batch file without having to distribute SED with my batch file or tell the user they need to download SED to use it?


Yes. You could use the batch script created by BHX to decode the sed.exe and then run it, and optionally to delete the sed.exe again.


Just clarifying here that the script in the first post creates the file BHX.EXE utility in the same way that SED.EXE would be recreated.

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 20:05
by berserker
while its a novel idea, like creating an "installer" but i think not much difference if I just download sed.exe and use it.
any benefits at all?

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 20:37
by Squashman
berserker wrote:while its a novel idea, like creating an "installer" but i think not much difference if I just download sed.exe and use it.
any benefits at all?

I do see the benefits now. Again in your "World" you are allowed to download and install anything you want and you have the benefit of knowing more about Unix based utilities. Most people don't. This does seem to have the benefit of not having to download extra utilities if that is truly the case.

Re: [utility] Bhx 2.1

Posted: 05 Jan 2014 20:41
by berserker
Squashman wrote: This does seem to have the benefit of not having to download extra utilities if that is truly the case.

yes, it does have that benefit. but you have to create all those hex stuff from sed.exe first and "repackage" it. Doesn't sound different to me as its still "downloading" from somewhere. if a facility disallow downloading stuff then I don't especially think this kind "installer" would be allowed.