Option to verify the tripwire code
This commit is contained in:
parent
99479d6448
commit
d9adff3a9e
|
@ -1268,6 +1268,18 @@ function security_settings {
|
||||||
any_key
|
any_key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function show_tripwire_verification_code {
|
||||||
|
clear
|
||||||
|
echo ''
|
||||||
|
echo $'Tripwire Verification Code'
|
||||||
|
echo ''
|
||||||
|
DBHASH=$(sha512sum /var/lib/tripwire/${HOSTNAME}.twd)
|
||||||
|
echo "$DBHASH" | qrencode -t UTF8
|
||||||
|
echo ''
|
||||||
|
echo "$DBHASH"
|
||||||
|
echo ''
|
||||||
|
}
|
||||||
|
|
||||||
function reset_tripwire {
|
function reset_tripwire {
|
||||||
if [ ! -f /usr/bin/reset-tripwire ]; then
|
if [ ! -f /usr/bin/reset-tripwire ]; then
|
||||||
echo $'Missing /usr/bin/reset-tripwire'
|
echo $'Missing /usr/bin/reset-tripwire'
|
||||||
|
@ -1299,12 +1311,10 @@ function reset_tripwire {
|
||||||
' | reset-tripwire
|
' | reset-tripwire
|
||||||
echo ''
|
echo ''
|
||||||
if [ -f /var/lib/tripwire/${HOSTNAME}.twd ]; then
|
if [ -f /var/lib/tripwire/${HOSTNAME}.twd ]; then
|
||||||
DBHASH=$(sha512sum /var/lib/tripwire/${HOSTNAME}.twd)
|
show_tripwire_verification_code
|
||||||
echo "$DBHASH" | qrencode -t UTF8
|
echo $'Tripwire is now reset. Take a note of the above hash, or record'
|
||||||
echo ''
|
echo $'the QR code using a mobile device. This will enable you to independently'
|
||||||
echo "$DBHASH"
|
echo $'verify the integrity of the tripwire.'
|
||||||
echo ''
|
|
||||||
echo $'Tripwire is now reset'
|
|
||||||
else
|
else
|
||||||
echo $'ERROR: tripwire database was not created'
|
echo $'ERROR: tripwire database was not created'
|
||||||
fi
|
fi
|
||||||
|
@ -2131,27 +2141,28 @@ function menu_top_level {
|
||||||
trap "rm -f $data" 0 1 2 5 15
|
trap "rm -f $data" 0 1 2 5 15
|
||||||
dialog --backtitle $"Freedombone Control Panel" \
|
dialog --backtitle $"Freedombone Control Panel" \
|
||||||
--title $"Control Panel" \
|
--title $"Control Panel" \
|
||||||
--radiolist $"Choose an operation:" 28 70 20 \
|
--radiolist $"Choose an operation:" 29 70 21 \
|
||||||
1 $"About this system" off \
|
1 $"About this system" off \
|
||||||
2 $"Passwords" off \
|
2 $"Passwords" off \
|
||||||
3 $"Backup and Restore" off \
|
3 $"Backup and Restore" off \
|
||||||
4 $"Show Firewall" off \
|
4 $"Show Firewall" off \
|
||||||
5 $"Reset Tripwire" off \
|
5 $"Verify Tripwire Code" off \
|
||||||
6 $"App Settings" off \
|
6 $"Reset Tripwire" off \
|
||||||
7 $"Add/Remove Apps" off \
|
7 $"App Settings" off \
|
||||||
8 $"Logging on/off" off \
|
8 $"Add/Remove Apps" off \
|
||||||
9 $"Ping enable/disable" off \
|
9 $"Logging on/off" off \
|
||||||
10 $"Manage Users" off \
|
10 $"Ping enable/disable" off \
|
||||||
11 $"Email Menu" off \
|
11 $"Manage Users" off \
|
||||||
12 $"Domain or User Blocking" off \
|
12 $"Email Menu" off \
|
||||||
13 $"Security Settings" off \
|
13 $"Domain or User Blocking" off \
|
||||||
14 $"Change the name of this system" off \
|
14 $"Security Settings" off \
|
||||||
15 $"Set a static local IP address" off \
|
15 $"Change the name of this system" off \
|
||||||
16 $"Wifi menu" off \
|
16 $"Set a static local IP address" off \
|
||||||
17 $"Check for updates" off \
|
17 $"Wifi menu" off \
|
||||||
18 $"Power off the system" off \
|
18 $"Check for updates" off \
|
||||||
19 $"Restart the system" off \
|
19 $"Power off the system" off \
|
||||||
20 $"Exit" on 2> $data
|
20 $"Restart the system" off \
|
||||||
|
21 $"Exit" on 2> $data
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) exit 1;;
|
1) exit 1;;
|
||||||
|
@ -2163,26 +2174,28 @@ function menu_top_level {
|
||||||
2) view_or_change_passwords;;
|
2) view_or_change_passwords;;
|
||||||
3) menu_backup_restore;;
|
3) menu_backup_restore;;
|
||||||
4) show_firewall;;
|
4) show_firewall;;
|
||||||
5) reset_tripwire;;
|
5) show_tripwire_verification_code
|
||||||
6) menu_app_settings;;
|
any_key;;
|
||||||
7) /usr/local/bin/addremove
|
6) reset_tripwire;;
|
||||||
|
7) menu_app_settings;;
|
||||||
|
8) /usr/local/bin/addremove
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
any_key
|
any_key
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
8) logging_on_off;;
|
9) logging_on_off;;
|
||||||
9) ping_enable_disable;;
|
10) ping_enable_disable;;
|
||||||
10) menu_users;;
|
11) menu_users;;
|
||||||
11) menu_email;;
|
12) menu_email;;
|
||||||
12) domain_blocking;;
|
13) domain_blocking;;
|
||||||
13) security_settings;;
|
14) security_settings;;
|
||||||
14) change_system_name;;
|
15) change_system_name;;
|
||||||
15) set_static_IP;;
|
16) set_static_IP;;
|
||||||
16) menu_wifi;;
|
17) menu_wifi;;
|
||||||
17) check_for_updates;;
|
18) check_for_updates;;
|
||||||
18) shut_down_system;;
|
19) shut_down_system;;
|
||||||
19) restart_system;;
|
20) restart_system;;
|
||||||
20) break;;
|
21) break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue