Skip to content

Instantly share code, notes, and snippets.

@lv7777
Created November 18, 2016 06:40
Show Gist options
  • Save lv7777/f6da63d2660024f5693ac90d47329381 to your computer and use it in GitHub Desktop.
Save lv7777/f6da63d2660024f5693ac90d47329381 to your computer and use it in GitHub Desktop.
Downloadsフォルダに自動で実行権を与えてくれる危ない奴.ctfとかで使うと便利か.(bashrcに書くのもよし,ctf時のみ起動させるもよし)
#! /bin/bash
# usage: bash automod.sh &
# which,hash,typeだとtypeが最強・・・
if type inotifywait;then
while inotifywait -e moved_to ~/Downloads/
do
chmod 777 -R ~/Downloads/
done
else
echo "先輩!!まずいですよ!!"
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment