Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Kill switch?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Babkockdood" data-source="post: 1196650" data-attributes="member: 128873"><p>Jeez, I haven't posted here in forever.</p><p></p><p>I've been thinking about this for a while now, what if I were to write a program that instantly kills all processes? I figured it would be pretty tricky to do this with software, so I thought about doing it with hardware. As in building a magic/more magic switch that cuts all power to the computer when in the "more magic" position. Despite how awesome that sounds, building it would be incredibly risky.</p><p></p><p>I noticed entering the following into a terminal...</p><p></p><p>[CODE]sudo killall launchd[/CODE]</p><p></p><p>...violently restarts the computer. Is there any way I could do this without having to enter my password? I figured I could keep my WidgetTerm running a root shell and aliasing "killswitch" to "sudo killall launchd".</p><p></p><p>I apologize, I know it appears incredibly obvious that I'm writing something malicious, but that's not it at all. I'm only curious, and the concept of a kill switch fascinates me. Most modern kernels can tell when the computer wasn't shut down properly and can fix the hard drive anyway.</p><p></p><p>Once again, please don't mistake my intentions, I'm only curious.</p></blockquote><p></p>
[QUOTE="Babkockdood, post: 1196650, member: 128873"] Jeez, I haven't posted here in forever. I've been thinking about this for a while now, what if I were to write a program that instantly kills all processes? I figured it would be pretty tricky to do this with software, so I thought about doing it with hardware. As in building a magic/more magic switch that cuts all power to the computer when in the "more magic" position. Despite how awesome that sounds, building it would be incredibly risky. I noticed entering the following into a terminal... [CODE]sudo killall launchd[/CODE] ...violently restarts the computer. Is there any way I could do this without having to enter my password? I figured I could keep my WidgetTerm running a root shell and aliasing "killswitch" to "sudo killall launchd". I apologize, I know it appears incredibly obvious that I'm writing something malicious, but that's not it at all. I'm only curious, and the concept of a kill switch fascinates me. Most modern kernels can tell when the computer wasn't shut down properly and can fix the hard drive anyway. Once again, please don't mistake my intentions, I'm only curious. [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Kill switch?
Top