05 January 2010

Auto-shutdown for Linux machine

If you want to schedule more than just a shutdown, crontab is the tool generally used for running commands on a recurring schedule.

You should to be root:

# su
Then, type the root's password

Then, use this command:

# crontab -e
Add the following line:

55 18 * * /sbin/shutdown -h 19:00

It will auto-shutdown computer at 19:00 (after prompt users at 18:55) everyday.

To make it works immediately, you need to restart cron service:

# /etc/init.d/crond restart

That's it. :)

Shellcode that bring back tty input

There are cases that you think you have been able to exploit the bug (e.g. buffer-overflow) but the program is terminated right awa...