-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new file: sdcard/config.txt modified: sdcard/debug_cmd.sh modified: sdcard/hack/ptz-ctrl modified: sdcard/hack/www/cgi-bin/webui copied: sdcard/debug_cmd.sh -> sdcard/persistenthack.sh new file: sdcard/restore.sh new file: sdcard/sdcardhack.sh modified: sdcard/start.sh deleted: sdcardrestore.zip
- Loading branch information
1 parent
42295f4
commit b34259d
Showing
9 changed files
with
193 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
########################### | ||
# ZS-GX1 Hacks Config File | ||
########################### | ||
|
||
## Persistent hack | ||
# YES = SD Card NOT required after hack is installed | ||
# NO = SD Card always required | ||
# Default = NO | ||
|
||
PERSISTENT=NO | ||
|
||
## Restore camera to original state | ||
# Default = NO | ||
|
||
RESTORE=NO | ||
|
||
## Silence Voices | ||
# YES = Silence Voices | ||
# NO = Keep Voices | ||
# Default = NO | ||
# Possibly causes some cameras to fail - use at your own risk | ||
|
||
VOICE=NO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,36 @@ | ||
#!/bin/sh | ||
# | ||
|
||
#Copy hack files | ||
mkdir /home/hack | ||
cp -R /mnt/hack/* /home/hack/ | ||
|
||
#Copy new hack start.sh | ||
if [ ! -f /home/start.sh.orig ]; then | ||
cp /home/start.sh /home/start.sh.orig | ||
# include config | ||
. /mnt/config.txt | ||
|
||
if [ "$VOICE" = "YES" ]; then | ||
rm /home/VOICEOFF | ||
rm /home/VOICEON | ||
touch /home/VOICEOFF | ||
else | ||
rm /home/VOICEOFF | ||
rm /home/VOICEON | ||
touch /home/VOICEON | ||
fi | ||
|
||
cp /mnt/start.sh /home/start.sh | ||
|
||
#Rename debug_cmd.sh to prevent it running again | ||
mv /mnt/debug_cmd.sh /mnt/debug_cmd.sh.hack | ||
if [ "$RESTORE" = "YES" ]; then | ||
/mnt/restore.sh | ||
|
||
elif [ "$PERSISTENT" = "YES" ];then | ||
rm /home/HACKP | ||
rm /home/HACKSD | ||
touch /home/HACKP | ||
/mnt/persistenthack.sh | ||
|
||
elif [ ! "$PERSISTENT" = "YES" ];then | ||
rm /home/HACKP | ||
rm /home/HACKSD | ||
touch /home/HACKSD | ||
/mnt/sdcardhack.sh | ||
fi | ||
|
||
#reboot to apply hacks | ||
reboot | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
#!/bin/sh | ||
# | ||
|
||
if [ -f /home/HACKP ]; then | ||
ptzfolder="/home/hack" | ||
elif [ -f /home/HACKSD ]; then | ||
ptzfolder="/media/hack" | ||
fi | ||
|
||
if [ $1 = "u" ]; | ||
then | ||
/home/hack/ptz 0x65 0x14 && sleep 1 && /home/hack/ptz 0x64 0x14 | ||
$ptzfolder/ptz 0x65 0x14 && sleep 1 && $ptzfolder/ptz 0x64 0x14 | ||
fi | ||
if [ $1 = "d" ]; | ||
then | ||
/home/hack/ptz 0x66 0x14 && sleep 1 && /home/hack/ptz 0x64 0x14 | ||
$ptzfolder/ptz 0x66 0x14 && sleep 1 && $ptzfolder/ptz 0x64 0x14 | ||
fi | ||
if [ $1 = "l" ]; | ||
then | ||
/home/hack/ptz 0x67 0x14 && sleep 1 && /home/hack/ptz 0x64 0x14 | ||
$ptzfolder/ptz 0x67 0x14 && sleep 1 && $ptzfolder/ptz 0x64 0x14 | ||
fi | ||
if [ $1 = "r" ]; | ||
then | ||
/home/hack/ptz 0x68 0x14 && sleep 1 && /home/hack/ptz 0x64 0x14 | ||
$ptzfolder/ptz 0x68 0x14 && sleep 1 && $ptzfolder/ptz 0x64 0x14 | ||
fi | ||
if [ $1 = "lu" ]; | ||
then | ||
/home/hack/ptz 0x69 0x200020 && sleep 1 && /home/hack/ptz 0x64 0x14 | ||
$ptzfolder/ptz 0x69 0x200020 && sleep 1 && $ptzfolder/ptz 0x64 0x14 | ||
fi | ||
if [ $1 = "ld" ]; | ||
then | ||
/home/hack/ptz 0x6a 0x200020 && sleep 1 && /home/hack/ptz 0x64 0x14 | ||
$ptzfolder/ptz 0x6a 0x200020 && sleep 1 && $ptzfolder/ptz 0x64 0x14 | ||
fi | ||
if [ $1 = "ru" ]; | ||
then | ||
/home/hack/ptz 0x6b 0x200020 && sleep 1 && /home/hack/ptz 0x64 0x14 | ||
$ptzfolder/ptz 0x6b 0x200020 && sleep 1 && $ptzfolder/ptz 0x64 0x14 | ||
fi | ||
if [ $1 = "rd" ]; | ||
then | ||
/home/hack/ptz 0x6c 0x200020 && sleep 1 && /home/hack/ptz 0x64 0x14 | ||
$ptzfolder/ptz 0x6c 0x200020 && sleep 1 && $ptzfolder/ptz 0x64 0x14 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
# | ||
|
||
#Copy hack files | ||
mkdir /home/hack | ||
cp -R /mnt/hack/* /home/hack/ | ||
|
||
#Copy new hack start.sh | ||
if [ ! -f /home/start.sh.orig ]; then | ||
cp /home/start.sh /home/start.sh.orig | ||
fi | ||
|
||
cp /mnt/start.sh /home/start.sh | ||
|
||
#Rename debug_cmd.sh to prevent it running again | ||
mv /mnt/debug_cmd.sh /mnt/debug_cmd.sh.hack | ||
|
||
#reboot to apply hacks | ||
reboot | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# | ||
|
||
#remove hack files | ||
rm -rf /home/hack | ||
rm /home/VOICEOFF | ||
rm /home/VOICEON | ||
rm /home/HACKP | ||
rm /home/HACKSD | ||
|
||
#restore original start.sh | ||
cp /home/start.sh.orig /home/start.sh | ||
|
||
#restore original VOICE.tgz | ||
cp /home/VOICE-orig.tgz /home/VOICE.tgz | ||
|
||
#Rename debug_cmd.sh to prevent it running again | ||
mv /mnt/debug_cmd.sh /mnt/debug_cmd.sh.restore | ||
|
||
#reboot to apply hacks | ||
reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
#ANT-THOMAS | ||
############ | ||
# HACKS HERE | ||
|
||
# mount sd card to separate location | ||
if [ -b /dev/mmcblk0p1 ]; then | ||
mount -t vfat /dev/mmcblk0p1 /media | ||
elif [ -b /dev/mmcblk0 ]; then | ||
mount -t vfat /dev/mmcblk0 /media | ||
fi | ||
|
||
cp /media/hack/group /etc/group | ||
|
||
# install updated version of busybox | ||
cp /bin/busybox /bin/busybox-orig | ||
cp /media/hack/busybox-armv6l /bin/busybox | ||
/bin/busybox --install -s | ||
|
||
# busybox httpd | ||
busybox httpd -p 8080 -h /media/hack/www | ||
|
||
# setup and install dropbear ssh server | ||
#cp /media/hack/dropbearmulti /bin/dropbearmulti | ||
mkdir /etc/dropbear | ||
cp /media/hack/dropbear_ecdsa_host_key /etc/dropbear/dropbear_ecdsa_host_key | ||
/media/hack/dropbearmulti dropbear | ||
|
||
# update hosts file to prevent communication | ||
cp /media/hack/hosts.new /etc/hosts | ||
|
||
# start ftp server | ||
(tcpsvd -E 0.0.0.0 21 ftpd / ) & | ||
|
||
# sync the time | ||
(sleep 20 && ntpd -q -p 0.uk.pool.ntp.org ) & | ||
|
||
# silence the voices | ||
if [ ! -f /home/VOICE-orig.tgz ]; then | ||
cp /home/VOICE.tgz /home/VOICE-orig.tgz | ||
fi | ||
|
||
if [ -f /home/VOICEOFF ]; then | ||
cp /media/hack/VOICE-new.tgz /home/VOICE.tgz | ||
fi | ||
|
||
# turn off high pitched noise | ||
(sleep 20 && /media/hack/goke_volume -s 0 ) & | ||
|
||
# | ||
############ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters