Bash Hack Testing and V4L2 Info Scripts

This commit is contained in:
PSposito 2020-02-20 09:57:15 +02:00
parent 405b6366e4
commit 0c56b8ef51
No known key found for this signature in database
GPG Key ID: 92E2BB27E8617EFC
2 changed files with 29 additions and 0 deletions

18
demo.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
#Replace password below with your sudo password, i.e. "12345" if your password is 12345
echo "This is a Hacking Demo simulation for Camera Control"
echo "sudo rmmod -f uvcvideo"
echo "password" | sudo -S rmmod -f uvcvideo
read -n 1 -p"Press Enter to continue...." enterkey
echo "sudo modprobe uvcvideo"
echo "password" | sudo -S modprobe uvcvideo
read -n 1 -p "Press Enter to continue...." enterkey
echo "amixer set Capture nocap"
amixer set Capture nocap
read -n 1 -p "Press Enter to continue...." enterkey
echo "amixer set Capture cap"
amixer set Capture cap
read -n 1 -p "Press Enter to finish..." enterkey
echo "Hacking Demo finished"
clear

11
v4lstatus.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# Ctl+C to exit
userinput=""
printf "\nOutput of: lsof /dev | grep video && ls /dev/ | grep v4l\n"
while true
do
printf "\nOutput of: lsof /dev | grep video && ls /dev/ | grep v4l\n"
printf "\n---------------------------------------------------------------------------------------\n"
lsof /dev | grep video && ls /dev/ | grep v4l
done
printf "\nYou have typed : $userinput\n"