Author |
Message |
TokenHerbz
![](http://compsci.ca/v3/uploads/user_avatars/717170395558e628d9452b.jpg)
|
Posted: Fri Mar 03, 2006 11:14 am Post subject: Protecting coded windows... |
|
|
Hey, say in turing you have a game which has serveral seperate windows joined by include from the main window...
ex. 1:
Main window have the following
code: |
include "test.dll"
put num
|
The dll file:
what i did was save as test.dll, and it works
when i run the main, it outputs 77
But, it will not work if the .dll file needs variables, ex:
if the test.dll was this
code: |
var num: int
get num
|
is there a way to *protect* the turing file which needs to use variables? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Fri Mar 03, 2006 12:55 pm Post subject: (No subject) |
|
|
include is equivalent to copy/pasting the code in place of the include line.
You'd have to elaborate on what you mean by protect |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
TokenHerbz
![](http://compsci.ca/v3/uploads/user_avatars/717170395558e628d9452b.jpg)
|
Posted: Fri Mar 03, 2006 8:36 pm Post subject: (No subject) |
|
|
protect as in: keeping others from seeing the code permanently. |
|
|
|
|
![](images/spacer.gif) |
MysticVegeta
![](http://www.geocities.com/ohsoinsane/my_avatar.JPG)
|
Posted: Fri Mar 03, 2006 8:53 pm Post subject: (No subject) |
|
|
Yes.
-> Create a program to encode the code.
-> Encode the code
-> Save it as "encoded.txt"
-> Open it with turing and read line by line, decode line by line in turing and save the file as "decoded.txt"
-> import "decoded.txt"
-> Do other stuff, make sure you save decoded.txt in C:/Somewhere/Somewhere, and delete it upon exit. |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Fri Mar 03, 2006 9:11 pm Post subject: (No subject) |
|
|
so you're looking to have your source-code unreadable but compiliable?
The problem is that Turing is not an interpriter, you can't include additional code run-time.
Now this could be overcome by building your own internal interpriter and some encoding/decoding work.
I'm curious as to what you're trying to hide and from whom? The simplest way to prevent others from reading your Turing source-code is to compile the program ![Laughing Laughing](images/smiles/icon_lol.gif) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
MysticVegeta
![](http://www.geocities.com/ohsoinsane/my_avatar.JPG)
|
Posted: Fri Mar 03, 2006 9:37 pm Post subject: (No subject) |
|
|
LOL Amen to that. By far, compiling is the best way to hide the code, but if you want to "include" files to "organize" your code, my method by far is I think the closest you can do... |
|
|
|
|
![](images/spacer.gif) |
md
![](http://compsci.ca/v3/uploads/user_avatars/1849317514ed6c4399768d.png)
|
Posted: Fri Mar 03, 2006 10:13 pm Post subject: (No subject) |
|
|
Umm... why do you need to encrypt your code? I'm gonna just jump out on a limb here and guess that your school provides some kind of storage that only you can access. If so then all you'd be doing by encrypting your code is making it more difficult for yourself. |
|
|
|
|
![](images/spacer.gif) |
TokenHerbz
![](http://compsci.ca/v3/uploads/user_avatars/717170395558e628d9452b.jpg)
|
Posted: Sat Mar 04, 2006 10:45 am Post subject: (No subject) |
|
|
actually im not in school...
And i just want to know for future references, atm i dont have anything i care about hiding.... i just want to know |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
TokenHerbz
![](http://compsci.ca/v3/uploads/user_avatars/717170395558e628d9452b.jpg)
|
Posted: Sat Mar 04, 2006 10:47 am Post subject: (No subject) |
|
|
Tony:: So if i compile it, it'll be .exe...
So... ill have include "name.exe" ? |
|
|
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Sat Mar 04, 2006 10:52 am Post subject: (No subject) |
|
|
No... He means that you compile the complete program, and you don't have to worry about others reading your code. Nothing with include. |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sat Mar 04, 2006 11:50 am Post subject: (No subject) |
|
|
When you compile a turing program that includes another turing file, that other turing file need not be sent to others with the executable. If you do package the turing file with it, changes to it will not affect the compiled code. It's code is copied & pasted into the main program at compile time, and there's no way to access it. |
|
|
|
|
![](images/spacer.gif) |
MysticVegeta
![](http://www.geocities.com/ohsoinsane/my_avatar.JPG)
|
Posted: Sat Mar 04, 2006 12:06 pm Post subject: (No subject) |
|
|
Cervantes wrote: It's code is copied & pasted into the main program at compile time, and there's no way to access it.
I wouldnt say that because there are things like W32DASM decompilers ![Razz Razz](http://compsci.ca/v3/images/smiles/icon_razz.gif) |
|
|
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Sat Mar 04, 2006 12:18 pm Post subject: (No subject) |
|
|
By the time they go through the Assembly -> Turing conversion, the code will look nothing at all like the original code. That's if they can convert it back to Turing. Anyone with that knowledge would also likely be spending their time on something more worthwhile. Besides, why would you care enough to waste your time doing something like that? ![Razz Razz](http://compsci.ca/v3/images/smiles/icon_razz.gif) |
|
|
|
|
![](images/spacer.gif) |
MysticVegeta
![](http://www.geocities.com/ohsoinsane/my_avatar.JPG)
|
Posted: Sat Mar 04, 2006 12:20 pm Post subject: (No subject) |
|
|
yup, thats what I thought, why would anyone spend time debugging a uselesss program, when with the same knowledge they can do "anything" ![Twisted Evil Twisted Evil](http://compsci.ca/v3/images/smiles/icon_twisted.gif) |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Sat Mar 04, 2006 12:24 pm Post subject: (No subject) |
|
|
For the purposes of a program that no one is actually going to try to break (from my understanding), close enough. |
|
|
|
|
![](images/spacer.gif) |
|