Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 14th Dec 2002 12:56
Calling out to anyone who knows their exes! I fully admit this is something I know nothing about!

Is it possible to extract *.dba code from a standalone *.exe compiled with DBPro? If it is possible, how, and how easy is it?

I'm not asking this because I want too. Quite the opposite infact, I'm worrying that if I or anyone else for that matter makes an outstanding finished game, people could extract the dba, add their own graphics/sonics and claim they made it themselves.

It could be like "Attack of the Clones II" Argh!
* If the apocalypse comes, email me *
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 14th Dec 2002 16:22
yes it can be done... not gonna explain how
but you can sit safe in the knowlage what is extracted isn't workable DB code

Anata aru kowagaru no watashi!
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 14th Dec 2002 17:05
Ah well thats good, should put off most lil upstarts wanting to gain credit for little effort Thanks Vegeta, I had a sneaking suspicion you'd know the answer 2 this one!

* If the apocalypse comes, email me *
actarus
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 14th Dec 2002 17:45
From what I heard,if you decompile a dB exe,all variables are lost...But then again,I never tried it nor never would I.

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour!
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 14th Dec 2002 19:16
Thanks Actarus. As I said, its not something I want to do, I am worried people might do it to me!! But with this feedback I am suitably cheered

* If the apocalypse comes, email me *
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 14th Dec 2002 20:30
you could open it with notepad and have a seizure
actarus
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 14th Dec 2002 23:39
lmao yup. (@[@)

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour!
Drunken Fingers
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 14th Dec 2002 23:46
Yes and no. You can get a lot more than you think but don't worry you can't get your code. BTW, if you make a game and try to say you wrote it in C++ but it's really DB it's not hard to find the truth. Here's some samples I got from one of my programs...

No I didn't hack anything. I'm a unix developer at work and I used a very basic tool called 'strings'. Could of used a hexeditor to change very minor stuff. i.e. If I had 'programmed by Mike' in ascii in the credits it cold be changed to Rick or something else. I think you could extract media files from the exe also (images, sounds, 3d, etc...). I noticed there's an 'encrypt media' option in DBpro but I haven't tried it yet.

Again, you can NOT get your code. I think that's what most ppl are worried about.


> Errors you might have seem before...

The array is empty
Array type is invalid
There was not enough memory to make such an array
Unknown array error
The file is too large
The file is invalid
File does not exist
File already exists
The string is to long
Stack overflow error!
Cannot make an array of that type!
Only positive numbers are allowed
Divide by zero error
Illegal size error!
Only positive numbers are allowed


DBProCSGDebug.dll
DBProLODTerrainDebug.dll
DBProMD3ObjectDebug.dll
DBProMD2ObjectDebug.dll
DBProMDLObjectDebug.dll
DBPro3DSObjectDebug.dll
DBProXObjectDebug.dll
DBProVectorsDebug.dll
DBProPrimObjectDebug.dll
DBProParticlesDebug.dll
DBProBSPCompilerDebug.dll
DBProOwnBSPDebug.dll
DBProQ2BSPDebug.dll
DBProWorld3DDebug.dll
DBProBasic3DDebug.dll
DBProMatrixDebug.dll
DBProLightDebug.dll
DBProCameraDebug.dll
DBProMultiplayerDebug.dll
DBProBitmapDebug.dll
DBProAnimationDebug.dll
DBProMemblocksDebug.dll


> Hey look, here's part of my stuff...

Barometric altitude:
Radar altitude:
Heading:
Throttle:
Speed:
Fuel:
Hull:
Scancode:
Press H for help on commands.
media\sud.jpg
media\a.x
media\shiptexture1.jpg
media\shiptexture2.jpg
media\shiptexture3.jpg
media\shiptexture4.jpg
media\shiptexture5.jpg
media\chup.x
media\crosshair.bmp


?PitchUp@@YAXHM@Z
?PitchUp@@YAXM@Z
?Point@@YAXHMMM@Z
?Point@@YAXMMM@Z
?Position@@YAXHMMM@Z
?Position@@YAXMMM@Z
?RefreshD3D@@YAXH@Z
?Reset@@YAXH@Z
?RollLeft@@YAXHM@Z
?RollLeft@@YAXM@Z
?RollRight@@YAXHM@Z
?RollRight@@YAXM@Z
?Rotate@@YAXHMMM@Z
?SetAutoCam@@YAXMMMM@Z
?SetAutoCamOff@@YAXXZ
?SetAutoCamOn@@YAXXZ
?SetCameraToImage@@YAXHHHH@Z
?SetCurrentCamera@@YAXH@Z
?SetErrorHandler@@YAXPAX@Z
?SetFOV@@YAXHM@Z
?SetFOV@@YAXM@Z
?SetPositionVector3@@YAXHH@Z
?SetRange@@YAXHMM@Z


Mesh Object02 {
-8.660254; 0.000000; 5.000000;,
-4.330127; -8.660254; 2.500000;,
-5.000000; -8.660254; 0.000000;,
-4.330127; -8.660254; -2.500000;,
-2.500000; -8.660254; -4.330128;,
-0.000000; -8.660254; -5.000000;,
-0.000000; 0.000000; -10.000000;,
-10.000001; 0.000000; 0.000000;,
-8.660254; 0.000000; -5.000000;,
-5.000000; 0.000000; -8.660254;,
-0.000000; -5.000000; -8.660254;,
-7.500000; -5.000000; 4.330126;,
-8.660254; -5.000000; 0.000000;,
-7.500000; -5.000000; -4.330128;,
-4.330127; -5.000000; -7.500000;;
actarus
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 14th Dec 2002 23:48
-you could open it with notepad and have a seizure

I think you could also see the hidden commands when doing so.

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour!
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 15th Dec 2002 01:28
DBPro exes are safe, but I'm not sure about DB classic.

DBPro exes are compiled directly into machine code like the executables produced by Visual C++ etc. In this process, the control structure is greatly simplified. There are no loops or anything in machine code, it is all done with JMP (GOTO) commands for example. There are many ways of converting what is effectively the same code into machine code and although a human could possibly work out what was going on and write their own code, getting a program to automatically go through the exe and produce DBA code is (virtually) impossible. The stuff that DrunkenFingers listed above references the DBPro DLLs which are "built in" to the final exe. References to them are easy to convert into DBA code, but the important part, the control structures, variables etc. are more difficult.

DB Classic on the other hand is an interpreter, which I presume means that the original code or (more likely) a tokenised version (ie. long, wordy commands are replaced with very simple symbols) is incorporated into the exe somewhere and theoretically, it should be possible to extract it and convert it. For other languages that use interpreters, this has been done. However once the language reaches a certain level of complexity this becomes very difficult. I know that for a relatively simple language called OPL on Psion Handhelds, the reverse translator was several thousands of lines long (you could reverse translate the reverse translator ), even though the language was only half-way between BASIC and DarkBASIC.

In conclusion, I think you are pretty safe

NOBODY has a forum name as stupid as Darth Shader. I do.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 15th Dec 2002 01:32
lol ... ya know for once i'm the only one who put it simple and to the point!

think i'm loosing my touch?

Anata aru kowagaru no watashi!
actarus
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 15th Dec 2002 07:01
lmao yep

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour!
EdzUp
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: UK
Posted: 15th Dec 2002 13:00
/me puts on pom-pom hat and glasses (trying to look like Bill Gates )

If you know assembler you can dissasemble it and recode bits that way but you can do that with any EXE.

Any string in a exe will be visible from any editor the reason for this is unclear but was the same back in the good old DOS days, for this reason alone I would advise using an array for a unlocking password rather than a string otherwise all you have to do is scan the exe for a string and look through those to find the password. I also now do this for copyright messages too.

Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 15th Dec 2002 13:55
Thanks so much guys, this is all really interesting and helpful. I had already tried to load it in Notepad and have seen variables there, but I don't really mind so long as you can't just extract code directly.

Very valid point about the passwords / copyright messages tho. I shall use arrays as you suggest

* If the apocalypse comes, email me *
mimesis
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 17th Dec 2002 21:36
Is it possible to hack away all of those darkbasic file
icons stored in the exe?

I know you can add your own icons in the editor and
replace some in the installation of dbp.

However even doing so does not replace all of the icons that are included in your compiled exe.

In winXP, DBS own pyramid icon shows in thumbnail view
and some other view.

Seems like some icons are locked in the exe, some tools
I've tryed werent able to edit/delete those at all.


And by the away is it legal to hack your own exe's?
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 18th Dec 2002 06:54
I knew someone with such a programme to get the code out of an exe and it did work but he is long gone and has moved onto other languages anyways. I wouldnt worry bout it.

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 19th Dec 2002 10:40
By the way, exes contatain the same type of data no matter how they are compiled and its impossible to read and understand them. they are made in 'Machine Code' in the ASCII code.

xxxpetratxxx
B. R. W
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 19th Dec 2002 15:15
Yes thats true in a sense Petra, but it is possible with some software to decompile them to an extent. It is also possible as people pointed out to open a DBPro exe in Notepad and scan through and find the odd piece of English - Variable, file names etc. Which would mean if you had a simple password system the variable and therefore password would be there for all to see!

* If the apocalypse comes, email me *
Hubdule
21
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 19th Dec 2002 16:06
What you can do is decompile a DBV1 exe back to source if you know how DBV1 works and how it saves the programs to an exe file. (mine worked fine)

What you 100% can't do ... get the source code back from a DBPro EXE ... that's impossible only thing you can get is some Assembler code ... but who knows that these days

Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 19th Dec 2002 19:45
@Kangaroo2

... but you'd have to be pretty stupid to think a simple password / variable system would be OK. All you have to do is introduce a simple system, which prevents people working out the password from the raw string.

Eg:

Convert the string password into character conversions:

pass = Char((33*2))+Char((33*2))+Char((33*2)) is "BBB"

of course, you could encrypt the password and decrypt it at runtime.

Eg:

RC4Pass = LKASJKAFL

at runtime.

If WhatTheUserEntered = Decrypt(RC4Pass)...

Remember though that IFs are very insecure.

NOBODY has a forum name as stupid as Darth Shader. I do.
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 20th Dec 2002 13:13
Yes, thank you, but I didn't mean I personally would do that, but many new users might.

The reason I initially worried is completely unrelated and stated at the beginning of the thread

Seems worries were unfounded tho, hopefully

* If the apocalypse comes, email me *
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 20th Dec 2002 19:38
sorry K2,

I have a very short memory. Threads longer than 5 posts confuse me.

Of course Raven answered your original query.

NOBODY has a forum name as stupid as Darth Shader. I do.
PiratSS
21
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 20th Dec 2002 20:51
Don't hack exes!

Use Tsearch+SoftIce,

that way you can hack values

and a bit of math code.

I am the greatest thing since sliced bread!!
Kangaroo2
21
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 20th Dec 2002 21:42
hehe no problems Darth

* If the apocalypse comes, email me *
Epidemicz
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 20th Dec 2002 22:34
Don't hack exes!

Use Tsearch+SoftIce,

that way you can hack values

and a bit of math code.


Same thing lol...TSearch rules but I hate SoftIce, ewwwwww......but I guess its good for stuff that uses dma

I am the very disease you pretend to be.

Login to post a reply

Server time is: 2024-05-05 01:17:34
Your offset time is: 2024-05-05 01:17:34