Guest User

setcasefold

a guest
Apr 11th, 2026
26
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.82 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. folder="$(pwd)"
  4.  
  5. # Check if a folder argument is provided
  6. if [ $# -gt 0 ]; then
  7.     # Assign the full path to a variable and remove trailing slash
  8.     folder="$(readlink -f -- "${1%/}")"
  9. fi
  10.  
  11. # Check if the folder exists
  12. if [ ! -d "$folder" ]; then
  13.     echo "Error: The specified folder '$folder' does not exist."
  14.     exit 1
  15. fi
  16.  
  17. # Ask for confirmation
  18. read -r -p "Are you sure you want to apply the +F flag to all directories in '$folder' and its subdirectories? (yes/no): " confirmation
  19.  
  20. if [[ ! "$confirmation" =~ ^([yY][eE][sS]|[yY])$ ]]; then
  21.     echo "Operation cancelled."
  22.     exit 1
  23. fi
  24.  
  25. # Check if the filesystem supports case-folding
  26. filesystem=$(df -P "$folder" | awk 'NR==2 {print $1}')
  27. if ! sudo tune2fs -l "$filesystem" | grep -q "casefold"; then
  28.     echo "Error: The filesystem containing '$folder' does not support case-folding."
  29.     exit 1
  30. fi
  31.  
  32. # Parent directory of the target folder
  33. parent_dir="$(dirname -- "$folder")"
  34.  
  35. # Create a temporary working directory next to the target
  36. if ! temp_dir=$(mktemp -d -p "$parent_dir" 2>/dev/null); then
  37.     echo "Error: Failed to create temporary directory in '$parent_dir'!"
  38.     exit 1
  39. fi
  40.  
  41. # Move the original folder into the temporary location
  42. mv "$folder" "$temp_dir/" 2>/dev/null
  43.  
  44. # Recreate directory tree and apply +F to each directory
  45. while IFS= read -r -d '' dir; do
  46.     rel_path="${dir#"$temp_dir/"}"
  47.     target_path="$parent_dir/$rel_path"
  48.  
  49.     mkdir -p -- "$target_path"
  50.     sudo chattr +F -- "$target_path"
  51. done < <(find "$temp_dir" -mindepth 1 -type d -print0)
  52.  
  53. # Root path of the moved original tree
  54. moved_root="$temp_dir/$(basename -- "$folder")"
  55.  
  56. # Copy files back into the recreated directories
  57. rsync -a -- "$moved_root/" "$folder/"
  58.  
  59. # Clean up temporary directory
  60. rm -rf -- "$temp_dir"
  61.  
  62. echo "Operation completed."
  63.  
Advertisement
Comments
  • Fenwezil
    4 days
    # CSS 0.83 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1S1iTruSLkgEPO8QtTuo2twS4f2FoJ3_l0-p4GKqeAUY/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 25% — 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).
Add Comment
Please, Sign In to add comment