Advertisement
metalx1000

Wansview IPCAM control interface BASH Shell

Feb 14th, 2018
1,001
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.80 KB | None | 0 0
  1. #!/bin/bash
  2. #Script by Kris Occhipinti
  3. #http://filmsbykris.com
  4. #GPLv3 - http://www.gnu.org/licenses/gpl-3.0.txt
  5. #Copyright Feb 2018
  6.  
  7. ip="192.168.1.179"
  8. user="username"
  9. pass="password"
  10.  
  11. echo "Enter Command (WASD) (P)icture (Q)uit"
  12. while [ 1 ]
  13. do
  14.   read -rsn1 c
  15.   if [ $c = "s" ]
  16.   then
  17.     printf "\r                                                                  "
  18.     printf "\rLast Command: Down"
  19.     wget -qO- /dev/null "http://$ip/decoder_control.cgi?&loginuse=$user&loginpas=$pass&command=2&onestep=1&15152518315000.571733322584179&_=1515251831501" 2&> /dev/null
  20.   elif [ $c = "w" ]
  21.   then
  22.     printf "\r                                            "
  23.     printf "\rLast Command: Up"
  24.     wget -qO- /dev/null "http://$ip/decoder_control.cgi?&loginuse=$user&loginpas=$pass&command=0&onestep=1&15152520149740.734559326264288&_=1515252014975" 2&> /dev/null
  25.   elif [ $c = "a" ]
  26.   then
  27.     printf "\r                                            "
  28.     printf "\rLast Command: Left"
  29.     wget -qO- /dev/null "http://$ip/decoder_control.cgi?&loginuse=$user&loginpas=$pass&command=4&onestep=1&15152522067620.3410644620228558&_=1515252206762" 2&> /dev/null
  30.   elif [ $c = "d" ]
  31.   then
  32.     printf "\r                                            "
  33.     printf "\rLast Command: Right"
  34.     wget -qO- /dev/null "http://$ip/decoder_control.cgi?&loginuse=$user&loginpas=$pass&command=6&onestep=1&15152522532600.21843916365527538&_=1515252253260" 2&> /dev/null
  35.   elif [ $c = "q" ]
  36.   then
  37.     printf "\r                                            "
  38.     printf "\rLast Command: Good-Bye..."
  39.     exit 0;
  40.   elif [ $c = "p" ]
  41.   then
  42.     printf "\r                                            "
  43.     printf "\rLast Command: Taking Photo..."
  44.     feh "http://$ip/snapshot.cgi?user=$user&pwd=$pass" > /dev/null
  45.   fi
  46. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement