Merge pull request #48 from KasperskyLab/dev

Little changes
This commit is contained in:
Félix Aimé 2021-02-12 17:00:19 +01:00 committed by GitHub
commit 98efec34b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 16 deletions

View File

@ -54,7 +54,7 @@
"mac_address": "Adresse MAC :",
"high": "elevee",
"moderate": "moyenne",
"low": "base"
"low": "basse"
},
"wifi-select": {
"already_connected_question": "Vous semblez être connecté à un réseau.<br />Voulez-vous utiliser cette connexion ?",

View File

@ -38,7 +38,7 @@
</div>
<div v-else class="none-wrapper">
<div class="center">
<h1 class="warning-title">{{ $t("report.fine_msg") }}</h1>
<h1 class="warning-title" v-html="$t('report.fine_msg')"></h1>
<button class="btn btn-report-low-light" v-on:click="save_capture()">{{ $t("report.save_capture") }}</button>
<button class="btn btn-report-low" v-on:click="new_capture()">{{ $t("report.start_new_capture") }}</button>
</div>

View File

@ -41,10 +41,10 @@ backend:
frontend:
shutdown_option: false
reboot_option: false
quit_option: true
quit_option: quitoption
download_links: false
hide_mouse: false
kiosk_mode: false
hide_mouse: hidemouse
kiosk_mode: kioskmode
remote_access: true
sparklines: true
virtual_keyboard: true

View File

@ -45,12 +45,12 @@ set_userlang() {
# Set the user language.
echo -e "\e[39m[+] Setting the user language...\e[39m"
printf -v joined '%s/' "${LOCALES[@]}"
echo -n " Please choose a language for the reports and the interface (${joined%/}): "
echo -n " Please choose a language for the reports and the user interface (${joined%/}): "
read lang
if [[ " ${LOCALES[@]} " =~ " ${lang} " ]]; then
sed -i "s/userlang/${lang}/g" /usr/share/tinycheck/config.yaml
echo -e "\e[92m [✔] User language setted!\e[39m"
echo -e "\e[92m [✔] User language settled!\e[39m"
else
echo -e "\e[91m [✘] You must choose between the languages proposed, let's retry.\e[39m"
set_userlang
@ -80,6 +80,23 @@ set_credentials() {
fi
}
set_kioskmode() {
echo -n " [?] Do you want to start TinyCheck in fullscreen during the system startup (aka. Kiosk mode)? [Yes/No] "
read answer
if [[ "$answer" =~ ^([yY][eE][sS]|[yY])$ ]]
then
sed -i "s/kioskmode/true/g" /usr/share/tinycheck/config.yaml
sed -i "s/hidemouse/true/g" /usr/share/tinycheck/config.yaml
sed -i "s/quitoption/true/g" /usr/share/tinycheck/config.yaml
echo -e "\e[92m [✔] TinyCheck settled in kiosk mode\e[39m"
else
sed -i "s/kioskmode/false/g" /usr/share/tinycheck/config.yaml
sed -i "s/hidemouse/false/g" /usr/share/tinycheck/config.yaml
sed -i "s/quitoption/false/g" /usr/share/tinycheck/config.yaml
echo -e "\e[92m [✔] TinyCheck settled in default mode, use the desktop icon to launch it.\e[39m"
fi
}
create_directory() {
# Create the TinyCheck directory and move the whole stuff there.
echo -e "[+] Creating TinyCheck folder under /usr/share/"
@ -336,7 +353,7 @@ check_interfaces(){
then
IFACES=( "${IFACES[@]/$ciface}" )
IFACE_OUT=$ciface
echo -e "\e[92m [✔] $ciface setted as a bridge to the Internet\e[39m"
echo -e "\e[92m [✔] $ciface settled as a bridge to the Internet\e[39m"
else
IFACES=( "${IFACES[@]/$ciface}" )
for iface in $IFACES;
@ -348,7 +365,7 @@ check_interfaces(){
then
IFACE_OUT=$iface
IFACES=( "${IFACES[@]/$iface}" )
echo -e "\e[92m [✔] $iface setted as a bridge to the Internet\e[39m"
echo -e "\e[92m [✔] $iface settled as a bridge to the Internet\e[39m"
break
fi
done
@ -369,7 +386,7 @@ check_interfaces(){
if [[ "$answer" =~ ^([yY][eE][sS]|[yY])$ ]]
then
IFACE_IN="$iface"
echo -e "\e[92m [✔] $iface setted as an Access Point\e[39m"
echo -e "\e[92m [✔] $iface settled as an Access Point\e[39m"
break
fi
fi
@ -377,7 +394,7 @@ check_interfaces(){
fi
done
if [ "${IFACE_IN}" != "" ] && [ "${IFACE_OUT}" != "" ]; then
echo -e "\e[92m [✔] Network configuration setted!\e[39m"
echo -e "\e[92m [✔] Network configuration settled!\e[39m"
else
echo -e "\e[91m [✘] You must select two interfaces, exiting.\e[39m"
exit 1
@ -429,6 +446,7 @@ else
create_directory
set_userlang
set_credentials
set_kioskmode
check_dependencies
configure_dnsmask
configure_dhcpcd

View File

@ -7,10 +7,10 @@ delete_folder(){
delete_services(){
echo "[+] Deleting TinyCheck services"
systemctl disable tinycheck-frontend
systemctl disable tinycheck-backend
systemctl disable tinycheck-kiosk
systemctl disable tinycheck-watchers
systemctl disable tinycheck-frontend &> /dev/null
systemctl disable tinycheck-backend &> /dev/null
systemctl disable tinycheck-kiosk &> /dev/null
systemctl disable tinycheck-watchers &> /dev/null
rm /lib/systemd/system/tinycheck-frontend.service
rm /lib/systemd/system/tinycheck-backend.service
@ -39,7 +39,7 @@ delete_packages(){
"sqlite3"
"nodejs")
echo -n "[?] Do you want to remove the installed packages? [Y/n] "
echo -n "[?] Do you want to remove the installed packages? (Yes/no) "
read answer
if [[ "$answer" =~ ^([yY][eE][sS]|[yY])$ ]]
then