Advertisement
Guest User

Untitled

a guest
Mar 28th, 2024
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.69 KB | None | 0 0
  1. fail="true"
  2. LUKS_PASSWORD1=""
  3. while [ $fail="true" ]; do
  4.  echo -n " Password > "
  5.  read LUKS_PASSWORD1
  6.  echo "";
  7.  
  8.  for dev in "${!devs[@]}"; do
  9.    echo "Opening ${devs[$dev]} to $dev"
  10.    echo $LUKS_PASSWORD1 | sudo cryptsetup luksOpen $dev ${devs[$dev]} -d - &
  11.  done;
  12.  wait
  13.  
  14.  if [[ -e /dev/mapper/dev0 ]]; then
  15.    [[ -e /dev/mapper/dev0 ]] && echo "true"
  16.    ssh -i /home/user/.ssh/another-machine novum@10.147.20.100 -t 'play "/images/voices/Shuuten Douji/databasesunlocked.mp3"; wait; exit;';
  17.    fail="false"
  18.  else
  19.    ssh -i /home/user/.ssh/another-machine novum@10.147.20.100 -t 'play "/images/voices/Shuuten Douji/that was incorrect, but please try again.mp3"; wait; exit;';
  20.  fi
  21. done
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement