SHARE
TWEET

Videos Flash en GNU/Linux V-2

jefesin Sep 10th, 2011 495 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #Script V-2; sábado, 10 de septiembre de 2011
  3. if [ $# -ne 1 ]; then
  4.     echo [+] Uso: ./video.sh [nombre-del-video]
  5.     exit
  6. fi
  7. echo [+] Buscando Video...
  8. num1=$(ps x | awk '/libflashplayer.so\ /{print $1}')
  9. num_bruto=$(ls -all /proc/$num1/fd/ | awk '/Flash/ {print $9}')
  10. control=$(expr $(echo $num_bruto | wc -c) / 3)
  11. if [ -z "$num_bruto" ]; then
  12.     echo [-] No se encontro el video.
  13.     echo [-] Tiene que estar el navegador abierto.
  14.     echo [+] By Jefesin // jefesin.blogspot.com
  15.     exit
  16. fi
  17. for (( i = 1; i <= $control; i++ )); do
  18.     num2=$(echo $num_bruto | awk '{print $'$i'}')
  19.     echo [+] Guardando Video...
  20.     cp /proc/$num1/fd/$num2 $HOME/$1-video-$i.flv
  21.     echo [+] Video Guardado en $HOME/$1-video-$i.flv
  22. done
  23. echo [+] By Jefesin // jefesin.blogspot.com
RAW Paste Data
Top