PureBin2Data

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

PureBin2Data

Post by ts-soft »

What does this tool?
- converts any binary file (up to 64MB) into a PureBasic DataSection
- compresses the DataSection (selectable JCalG1 or BriefLZ)

Why?
- smaller filesize
- sharing complete sourcecode
- posting source in boards
- makes it more difficult to steal own picture- and/or soundfiles

Image

http://www.purebasic.ts-soft-online.de/ ... n2data.zip
Last edited by ts-soft on Sun Jan 15, 2006 9:57 am, edited 2 times in total.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Wow, very nice but I haven't tried it yet, just sounds good. So if this is possible... then wouldn't it be possible to load a binary file into memory, using the same methods, somewhat? Cheers and I'll try it soon. ;)

EDIT
Let me refrase that. I see your program uses memory for it to work. My question is, would it be possible to run a binary that has been already included into an exe from memory using the method you use.

(example) Compile your source with a binary file using the include function. Then at runtime, this included binary gets converted to data to be ran from memory.

I asked this question some time back on the forum but I don't think anyone knew how at the time. Now seeing your post, it seems possible.
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

thx,
to use a exe file from DataSection, you must write the unpacked Data to harddisk. i have no way to run exe from memory.

This is the same function as includebinary, only in DataSection.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
okasvi
Enthusiast
Enthusiast
Posts: 150
Joined: Wed Apr 27, 2005 9:41 pm
Location: Finland

Post by okasvi »

viewtopic.php?t=11064&highlight=loadexe
okasvi wrote:http://www.security.org.sg/code/loadexe.html

that is POC of how to load exe to directly to memory from another exe where its inside... |:
there you go...


edit: if someone manages to make it work without compiling the POC as .obj and using dirty little tricks to include it into PB code, I would like to see the converted code :)
SFSxOI
Addict
Addict
Posts: 2970
Joined: Sat Dec 31, 2005 5:24 pm
Location: Where ya would never look.....

Post by SFSxOI »

Where is this at? I couldnt find it at the links posted.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

looks good.

However, the purearea download page has gone into a refresh frenzy. :D

It won't give the file (to Mozilla) and the "here" link is empty: {A href=""}

Any other link?

Thanks.
@}--`--,-- A rose by any other name ..
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Sorry, new Version with new Download, first Post corrected
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

ts-soft wrote:What does this tool?
- converts any binary file (up to 64MB) into a PureBasic DataSection
- compresses the DataSection (selectable JCalG1 or BriefLZ)
This tool is really great!!

Ts-soft, when selecting cmpression method it simply doesn't obey. I think it reads from the .ini file instead of gadgets.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: PureBin2Data

Post by NoahPhense »

Very nice. Gotta play with this one..

- np
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Psychophanta wrote: Ts-soft, when selecting cmpression method it simply doesn't obey. I think it reads from the .ini file instead of gadgets.
Select compression before Drop the File on GUI.
In Shell you can give 2 Parameters. With 1 Parameters, it's use the last GUI selection (stored in ini-file).

thx
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Grrr, now it works as it must.
I am drunk or what? :x

Well, then, please add a warning before overwrite same named file. :)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Psychophanta wrote: Well, then, please add a warning before overwrite same named file. :)
Okay, Version 1.6.1.20 with Warning
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

See if you can get this built-in to PB .. It can be a valuable tool.

- np
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

NoahPhense wrote:See if you can get this built-in to PB .. It can be a valuable tool.
Yes! I think so!

Ts-soft, another suggestion: Would be good to be able to choose between leave the data as HEX or DEC, :)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Psychophanta wrote: Ts-soft, another suggestion: Would be good to be able to choose between leave the data as HEX or DEC, :)
Why, for your eyes :wink:
I will make a Tool with HEX and script for RC-Files (Windows-Resources) in future, i hope
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply