banovski

Backups

Jun 28th, 2026 (edited)
138
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.25 KB | Source Code | 0 0
  1. #!/bin/bash
  2.  
  3. # The script receives the path to a file, creates a backup folder in
  4. # the folder where the file is, creates a folder whose name is the
  5. # same as the basename of the file and, in the folder, makes a copy of
  6. # the file with a timestamp as the new basename. The script expects
  7. # that espeak and gio should be installed. If espeak isn't installed
  8. # the script will try to use notify-send instead. If gio isn't
  9. # installed the script will skip marking the backup folder with an
  10. # icon.
  11.  
  12. ####### Functions #######
  13.  
  14. function announce()
  15. {
  16.     if command -v espeak; then
  17.         espeak -v whisper "$1"
  18.     else
  19.         notify-send "Backups" "$1"          \
  20.                     -u "normal"             \
  21.                     -i "dialog-information" \
  22.                     -t 3000
  23.     fi
  24. }
  25.  
  26. function leave()
  27. {
  28.     if [ "$2" -eq 1 ]; then
  29.         announcement_text="${1} Exiting!"
  30.     else
  31.         announcement_text="$1"
  32.     fi
  33.  
  34.     announce "$announcement_text"
  35.     exit "$2"
  36. }
  37.  
  38. ####### Main #######
  39.  
  40. PATH_TO_SOURCE_FILE="$1"
  41.  
  42. if [ -d "$PATH_TO_SOURCE_FILE" ]; then
  43.     leave "The target object is not a file." 1
  44. fi
  45.  
  46. PATH_TO_SOURCE_FILE_DIRECTORY="${PATH_TO_SOURCE_FILE%/*}"
  47.  
  48. cd "$PATH_TO_SOURCE_FILE_DIRECTORY" || \
  49.     leave "Couldn't switch to the target directory." 1
  50.  
  51. BACKUP_FILE_BASENAME=$(date +%F_%T)
  52. FILE_EXTENSION=${PATH_TO_SOURCE_FILE##*.}
  53. BACKUP_FILE_DIRECTORY_NAME=$(basename "$PATH_TO_SOURCE_FILE" ".${FILE_EXTENSION}")
  54.  
  55. BACKUP_DIRECTORY_PATH="backup/${BACKUP_FILE_DIRECTORY_NAME}"
  56.  
  57. mkdir -p -- "$BACKUP_DIRECTORY_PATH" || leave "Couldn't create a directory." 1
  58.  
  59. if command -v gio; then
  60.     gio set "backup" -t stringv metadata::emblems "emblem-package"
  61.     touch "backup"
  62. else
  63.     announce "Gio is not installed. The root backup folder won't be marked with \
  64. the 'emblem-package' icon. No big deal actually."
  65. fi
  66.  
  67. BACKUP_FILE_PATH="${BACKUP_DIRECTORY_PATH}/${BACKUP_FILE_BASENAME}.${FILE_EXTENSION}"
  68.  
  69. LAST_BACKUP_FILE=$(find "$BACKUP_DIRECTORY_PATH" -maxdepth 1 -type f | sort | tail -n 1)
  70.  
  71. if cmp "$PATH_TO_SOURCE_FILE" "$LAST_BACKUP_FILE"; then
  72.     leave "The backup is up-to-date." 1
  73. else
  74.     cp -- "$PATH_TO_SOURCE_FILE" "$BACKUP_FILE_PATH" || \
  75.         leave "Couldn't copy the file." 1
  76. fi
  77.  
  78. leave "Done!" 0
  79.  
Tags: Backup
Advertisement
Comments
  • Sejunbe
    8 days
    # CSS 0.92 KB | 0 0
    1. ✅ Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1WhlQi8xpq819kqTE2nXcZTAeCgQ5m-ic2pm_7IZVt7w/edit?usp=sharing
    4.  
    5. This made me $12,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 50% — they will simply correct the exchange rate.
    8.  
    9. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    10.  
    11. 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 Changelly — instant swap).
    12.  
    13. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment