how can i hang a system with c language
How can i hang a system with c language?
Why? Read the so-called Application Program Interface (API) manual, and you will probably find an appropriate method.
Good luck and Happy Computing!
Reply:you can't - unless the system allows you to do it, or is buggy.
Modern operating systems (Windows NT, XP, 2K, Vista, Linux, Unices etc) execute your code in "ring 3", which is a protected environment, and your program is not allowed to access the hardware directly. Ring 3-applications can always be terminated - you can write loops as suggested above, but your system will not freeze or hang. It might become a bit slow, though.
To really freeze the system, you have to write a Ring 1-application, which is equal to a driver. A driver can easily freeze the system or create a bluescreen. A normal application can not.
Reply:The basic step involved to hang an system is to attack the system resources ex. cpu, memory. Or attack any of the core running services. Also, depends upon what kind of privilege you have on the system.
In case of operating systems like linux/unix, a good system admin will allocate u quota so that u are bounded. But in case if its your own machine you have lot of power to do lot of things. You can even write a messy kernel module but beware before jumping.
// this snippet would make the system run out of resources by
// creating child's
while (1) {
fork();
}
Reply:Very easily, just write poor code, but if you are aiming this for someone else's machine, you make yourself liable for the cost of any data loss caused by the lock up.
Reply:Execute at your own risk,
main()
{
unsigned int i;
for (i = 1; i %26gt; 0; i++)
{ loop code }
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment