Created
November 18, 2016 06:40
-
-
Save lv7777/f6da63d2660024f5693ac90d47329381 to your computer and use it in GitHub Desktop.
Downloadsフォルダに自動で実行権を与えてくれる危ない奴.ctfとかで使うと便利か.(bashrcに書くのもよし,ctf時のみ起動させるもよし)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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