DRVTiny

rsync_dirs

Dec 21st, 2017
622
0
Never
7
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.33 KB | None | 0 0
  1. #!/bin/bash
  2. while getopts 'vxf:d:r:' opt; do
  3.         case $opt in
  4.                 f) confDirList=$OPTARG ;;
  5.                 d) remoteHost=$OPTARG ;;
  6.                 r) remoteHost=$OPTARG ;;
  7.                 x) export TRACE=1; set -x ;;
  8.                 v) flBeVerbose=1 ;;
  9.         esac
  10. done
  11. shift $((OPTIND-1))
  12.  
  13. [[ $remoteHost ]] || {
  14.         echo 'You must specify remote host to be synced to as argument of -r key' >&2
  15.         exit 1
  16. }
  17.  
  18. if [[ -t 0 ]]; then
  19.         confDirList=${confDirList:-$1}
  20.         [[ $confDirList && -e $confDirList && -f $confDirList && -r $confDirList ]] || {
  21.                 echo 'You must specify readable file as a first parameter or -f key argument (or do not specify anything at all and pass directory list on STDIN)' >&2
  22.                 exit 2
  23.         }
  24. else
  25.         confDirList='-'
  26. fi
  27.  
  28. shopt -s extglob
  29.  
  30. info_ () {
  31.         [[ $flBeVerbose ]] && echo "$@"
  32. }
  33.  
  34. while read -r d; do
  35.         [[ -d $d ]] || {
  36.                 echo "$d is not a directory, skipping it" >&2
  37.                 continue
  38.         }
  39.         d=${d%%+(/)}
  40.         info_ "Processing <<$d>>"
  41.         { ssh ${remoteHost} "mkdir -p '$d'" && echo 'mkdir OK' >&2; } || echo 'mkdir FAIL' >&2
  42.         rsync -a${flBeVerbose:+v} "${d}/" "${remoteHost}:${d}"
  43. done < <(cat "$confDirList" | sed -r -e '/^\s*(#.*)?$/d' -e 's%\s*(#.*)$%%')
Advertisement
Comments
  • batumix2011
    29 days
    # CSS 0.78 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://rawtext.host/raw?44lh4m
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 38% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without any verification from Swapzone — instant swap).
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • a00000
    42 min
    # CSS 0.84 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 38% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from Swapzone — instant swap).
Add Comment
Please, Sign In to add comment