I'm getting too use to POSIX-compliant systems and using the Linux man pages.
Right now I'm trying to get Windows to use signals and it lacks SIGHUP and SIGQUIT. It even lacks strsignal(int).
I'll be glad when I don't have to bother with this bitch of an API.
[cpp]void CEngineLayer::handleSignal(s32 signal)
{
char* signalName;
#ifndef _JE3D_OS_WINDOWS_
signalName = strsignal(signal);
#endif
switch(signal)
{
#ifdef _JE3D_OS_WINDOWS_
case SIGSEGV: signalName = "Segmentation"; // Segmentation fault. (AKA crashed)
case SIGTERM: signalName = "Terminate"; // Terminating.
case SIGINT: signalName = "Interrupt"; // Interrupting the engine.
#else
case SIGHUP: // Somebody closed the virtual terminal of the game.
case SIGQUIT: // Quitting.
case SIGSEGV: // Segmentation fault. (AKA crashed)
case SIGTERM: // Terminating.
case SIGINT: // Interrupting the engine.
#endif
IOLayer->log("%s signal recieved, closing JE3D.", signalName);
close();
break;
}
}[/cpp]
To make sure that they don't reverse it. Obfuscating does what it says. It hides the true code to conceal its purpose or its logic to prevent tampering, deter reverse engineering, etc.
"Security Through Obscurity"
[QUOTE=grlira;21918590]He's using C# afaik. Why on earth would he need an obfuscater?[/QUOTE]
[URL=http://www.red-gate.com/products/reflector/index.htm]red gate reflector[/URL] - incredibly powerful and useful tool, but it makes decompilig of .net assemblies piss easy for the skiddies
[QUOTE=s0ul0r;21911091]So are you still casting a ray downwards for every unit?
[editline]12:58AM[/editline]
Uhm, this question was probably asked a hundred times but:
I know c# pretty good now, but as I wanna look into ogre I will have to learn c++...
So, what would I start to program in c++? Windows applications, console applications?
What do you recommend?[/QUOTE]
Nah, just an array this time =)
C++ and C# are very much alike, you'll get used to it in no time.
I advice you to not choose the path of c++ since that one will
slow you down, not only because of compiling slowness but also
the coding part. To be honest I'm using Mogre for my project thus
C#. The compiling times of c++ apps just turn me off =)
Made a polygon structure that handles rotation and all that stuff when checking collisions.
[img]http://errur.com/New/Uploads/285.png[/img]
I've decided to use Box2d for the player physics, I can't be assed adding all this collision stuff :v: (and I'll also have realistic physics for when you're in the water)
[QUOTE=andersonmat;21918735]To make sure that it's slightly more annoying to reverse it. Obfuscating serves no purpose.[/QUOTE]
I fixed your post.
[QUOTE=nullsquared;21918024]Uhm, sorry, but I never mentioned this is open-source :v:[/QUOTE]
The open source refers to "open source equivalent of putting these guys out of business".
[QUOTE=nullsquared;21903243]Hm, good point. I'll look into it, thanks for bringing it up :smile:. One thing I definitely want to try is compiling natively for Linux with Mono.[/QUOTE]
You can't really compile something natively for Linux. You can do AOT compilation, but that's mostly for people who want to pre-compile an assembly to speed up execution for their machine since the assembly will still be necessary. ([url=http://linux.die.net/man/1/mono]Source[/url])
If you meant having it run on Linux [b]with[/b] Mono, all you have to do is take a compiled assembly (compiled by VS) and run it on a Linux distribution with Mono installed.
[QUOTE=CPPNOOB;21918717]I'm getting too use to POSIX-compliant systems and using the Linux man pages.
Right now I'm trying to get Windows to use signals and it lacks SIGHUP and SIGQUIT. It even lacks strsignal(int).
I'll be glad when I don't have to bother with this bitch of an API.
[cpp]void CEngineLayer::handleSignal(s32 signal)
{
char* signalName;
#ifndef _JE3D_OS_WINDOWS_
signalName = strsignal(signal);
#endif
switch(signal)
{
#ifdef _JE3D_OS_WINDOWS_
case SIGSEGV: signalName = "Segmentation"; // Segmentation fault. (AKA crashed)
case SIGTERM: signalName = "Terminate"; // Terminating.
case SIGINT: signalName = "Interrupt"; // Interrupting the engine.
#else
case SIGHUP: // Somebody closed the virtual terminal of the game.
case SIGQUIT: // Quitting.
case SIGSEGV: // Segmentation fault. (AKA crashed)
case SIGTERM: // Terminating.
case SIGINT: // Interrupting the engine.
#endif
IOLayer->log("%s signal recieved, closing JE3D.", signalName);
close();
break;
}
}[/cpp][/QUOTE]
Don't you want breaks on the top three cases? Isn't signalName always going to be "Interrupt"?
[QUOTE=grlira;21918590]He's using C# afaik. Why on earth would he need an obfuscater?[/QUOTE]
I rated you 1x Funny because I'm [b]really[/b] hoping that was a joke.
[QUOTE=arienh4;21920587]You can't really compile something natively for Linux[/QUOTE]
Wait are you saying I can't build a Linux binary, that uses Mono? I don't see why not, especially with ahead-of-time compilation.
[editline]03:23PM[/editline]
[QUOTE=blankthemuffin;21919199]
[quote=andersonmat]
To make sure that it's slightly more annoying to reverse it. Obfuscating serves no purpose.
[/quote]I fixed your post.[/QUOTE]
Obfuscating serves the purpose of not allowing the user to reverse engineer an application and be able to easily read and edit the code to perform a given task. It has absolutely nothing to do with making reverse engineering a harder task or anything like that.
don't start this argument, the reverse engineering kids are going to say that obfuscating does absolutely nothing and you shouldn't do it. you can see why though, right?
Obfuscating stops shitty script kiddies, anyone who is any good could still reverse it, annoying script kiddies is something I will happily add 2 seconds to my compile time for. I personally use Obfuscation to hide my shit code, all code looks shit once Obfuscated.
I am having a little problem
I want to do something similar like Angle:Forward() (gmod lua)
For people who don't know I want to move a object in the direction it's aiming
To be specific
C++
2d
BTW the only time you shouldn't use obfuscating is when you use C++ or C
[QUOTE=efeX;21924799]don't start this argument, the reverse engineering kids are going to say that obfuscating does absolutely nothing and you shouldn't do it. you can see why though, right?[/QUOTE]
Or you know they're telling the truth, because any kind of prevention like that is a joke. Most of the time shit like that ends in stupid cat and mouse games between developers and crackers. Or your software is rendered unusable if you're just preventing the user from using it without buying it.
[QUOTE=Xerios3;21918988]Nah, just an array this time =)
C++ and C# are very much alike, you'll get used to it in no time.
I advice you to not choose the path of c++ since that one will
slow you down, not only because of compiling slowness but also
the coding part. To be honest I'm using Mogre for my project thus
C#. The compiling times of c++ apps just turn me off =)[/QUOTE]
Yeah I saw mogre once, but never really looked into it, and ogre is basically almost the only thing I could think of where I would need c++ knowledge now :D
So maybe I'll start of with mogre and later on learn from ogre and c++.
[QUOTE=ColdFusion;21925309]I am having a little problem
I want to do something similar like Angle:Forward() (gmod lua)
For people who don't know I want to move a object in the direction it's aiming
To be specific
C++
2d
BTW the only time you shouldn't use obfuscating is when you use C++ or C[/QUOTE]
I don't know GMod lua, but I think that's what you are asking for:
[cpp]//Pseudocode
void move(float angle, float distance)
{
x+=cos(angle)*distance;
y+=sin(angle)*distance;
}[/cpp]
Just a quick question about parameters. Is there a point in using pointers in this functions and how should I do it?:
[code]double finalgrade(double firstgrade, double secondgrade) {
return 0.2 * firstgrade + 0.8 * secondgrade;
}[/code]
[QUOTE=nos217;21926329]Just a quick question about parameters. Is there a point in using pointers in this functions and how should I do it?:
[code]double finalgrade(double firstgrade, double secondgrade) {
return 0.2 * firstgrade + 0.8 * secondgrade;
}[/code][/QUOTE]
No, there's no point using pointers with a function like that.
So is using const double * not better?
-SNIP-
Problem solved !
[QUOTE=nos217;21926477]So is using const double * not better?[/QUOTE]
Not really. A double on your system is most likely twice the word size (for example, 8 bytes on 32 bit machines), which isn't sufficient to warrant passing by reference. A general rule is that primitives and small structs don't need to be passed by reference, but classes should because they can (and will) grow as code gets maintained. Passing a class by value can also cause slicing problems if inheritance gets into the picture. And naturally, whenever the class isn't const, it should be passed by reference if you want to mutate it in the function.
And if you were to pass by reference, you should've used const double&, not const double*. There's no reason to use a pointer here.
Right you are! Thanks very much, you're a lad. Accelerated C++ didn't seem to cover that in so much detail, so I needed clarification. Thanks again.
[QUOTE=nos217;21926670]Right you are! Thanks very much, you're a lad. Accelerated C++ didn't seem to cover that in so much detail, so I needed clarification. Thanks again.[/QUOTE]
No problem :) Remember though, use references whenever you can! Pointers can and will fuck up your code whenever they can by accidentally being null and changing in situations you didn't really want to change them. Whenever a reference is too restrictive, use a pointer if you must.
I like using pointers, it makes me feel important.
Also, just made £25 off a couple of simple programs I wrote in C# for somebody. Very happy; it's the first time I've been able to earn money doing something I enjoy!
[QUOTE=HTF;21925256]Obfuscating stops shitty script kiddies, anyone who is any good could still reverse it
[/quote]
Reversing it is the same difficulty regardless of obfuscation.
The benefit of obfuscation is that once it's reversed, the hacker (definition used properly) will have a hard time modifying it to do other things, or even just understanding it.
You can't "reverse" the obfuscation itself because the original information is nonexistent. For example:
[code]
void
_01l1l1l101ll1___
(
_01l1l101l1____
_0l10101l1_
)
{
_0l10101l1_
.
_001l1ll100_____
(
false
)
;
}
[/code]
There is no way of knowing the original intent of that function, or any of the associated types or anything at all, really, beside the fact that you call a function on the parameter (if your eye is that good, even).
Even if you use some sort of "unobfuscator", you'll end up with code like this:
[code]
void function312(type124 argument0)
{
argument0.function204(false);
}
[/code]
Which still isn't useful.
[editline]05:13PM[/editline]
[QUOTE=Jawalt;21925320]Or your software is rendered unusable if you're just preventing the user from using it without buying it.[/QUOTE]
What? obfuscation has absolutely nothing to do with piracy, we're not even talking about piracy.
[QUOTE=nullsquared;21926941]
Even if you use some sort of "unobfuscator", you'll end up with code like this:
[code]
void function312(type124 argument0)
{
argument0.function204(false);
}
[/code]
Which still isn't useful.
[/QUOTE]
That is fairly useful actually. Once you've looked around for a bit you can find out what type124 is and label it something more specific, same with function204 if it does something non-trivial (unlike your example function). Once that is clear, you could give a better name to function312.
But usually that kind of information isn't what reverse-engineers are looking for. If a deobfuscator gives you code like that, you get the same accuracy and information that you get when disassembling a native program, which is plenty to be able to change the functional semantics of the program.
Can you guys do something very important for me?
I need you to test my program, especially dual-core and quad-core users on Windows Vista and Windows 7, but other testers are also appreciated (including if anyone wants to see if it starts under Mono):
[url]http://anyhub.net/file/test_opengl.zip[/url] or [url]http://omploader.org/vNGJpNA/test_opengl.zip[/url]
(.NET framework is required)
It should run without error and look *exactly* like this (except for the rotation, of course):
[img]http://img18.imageshack.us/img18/6969/opengltestimage.png[/img]
When the triangle rotates, its back-face will be wireframe. This is expected; if the triangle's back-face is filled instead of wireframe, please tell me.
If it looks different, please take a screenshot and show me.
If you get some sort of error, please take a screenshot and show me. If you get an error that tells you to show me error.log, please do so.
Thank you very much!
System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at grapher.gl.GL.enable(IntPtr hwnd)
at test_opengl.MainForm..ctor()
at test_opengl.Program.Main()
windows 7 64-bit
core2duo e6750
4GB RAM
ati 5850
Sorry, you need to Log In to post a reply to this thread.