dimmuboy

autopswd

Jul 15th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1.  #!/bin/bash
  2.  
  3. window=`xdotool getactivewindow getwindowname`
  4. window+=`xprop -id $(xdotool getactivewindow) WM_CLASS`
  5. notify-send "Password auto typed"
  6. #notify-send "$window"
  7.  
  8. sleep 1
  9. if [[ $(echo $window | grep -i teamviewer) ]]; then
  10.   name='bla'
  11.   pswd='blable'
  12. elif [[ $(echo $window | grep -i keepass) ]]; then
  13.   pswd='blablebli'
  14. fi
  15.  
  16. if [[ $name ]]; then
  17.   xdotool type "$name"
  18.   xdotool key Tab
  19. fi
  20.  
  21. xdotool type "$pswd"
  22. xdotool key Return
Advertisement
Add Comment
Please, Sign In to add comment