Hi every body! you are enjoying.

I have a problem that if a person writes in his code:

"system("shutdown -s")"

in his program and if I run .exe file, my computer shutdowns. How would I dodge this trick?

Recommended Answers

All 6 Replies

Don't run the .exe file? Anyway, that's not a "trick", it's legitimate code. There are innumerable ways a programmer can "trick" you with their code, and the solution is to avoid running programs from such programmers rather than expecting to somehow introspectively recognize the tricks in object code and "dodge" them.

can u tell me a method to dodge this?

THere is no way, effectively to "dodge" this, other than by manually patching the machine code of the application itself to jump around the "system()" call.

Move shutdown out of your PATH though honestly the just don't run it would be better

Is there any method to get the source code of that .exe file?

THere is no way

You should be able to run this under a priviliged user account, which is not allowed to shutdown.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.