2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

HTTP経由で任意のコマンドを実行する

Last updated at Posted at 2022-04-14
echo GET / H | nc -l 8080 && systemctl poweroff -i

http://localhost:8080/ にアクセスするとシャットダウンできます。ポートフォワーディングすれば外出先からシャットダウンできます

curl localhost:8080
fetch('http://localhost:8080/')

// 動画が終了したらシャットダウン
document.querySelector('video[src]').addEventListener('ended', () => fetch('http://localhost:8080'))

Firefoxを開く

echo GET / H | nc -l 8080 && firefox

参考

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?