Upload files to ''
added flag option for install.sh (use quotes around command) example: install.sh -c 'wipri -d wlan0 -p'master
parent
4a30a76ec6
commit
93d8dabf59
42
install.sh
42
install.sh
|
@ -8,10 +8,17 @@
|
|||
# WiPri Guide: https://www.buymeacoffee.com/politictech/wifi-privacy-with-wipri-any-linux-device
|
||||
#
|
||||
|
||||
# Text Colors
|
||||
export BLUE='\033[1;94m'
|
||||
export GREEN='\033[1;92m'
|
||||
export RED='\033[1;91m'
|
||||
export ENDCOLOR='\033[1;00m'
|
||||
|
||||
wpcmd="wipri -d wlan0 -p" # Example command for boot, set on question during running
|
||||
wpservicefile='wipri.service' # wipri.service file location for the boot section
|
||||
|
||||
|
||||
# CREATE WIPRI AND WIPRI-LIST TOOL EXECUTABLES
|
||||
echo "Creating /etc/wipri directory..."
|
||||
sudo mkdir /etc/wipri
|
||||
sleep .5
|
||||
|
@ -31,6 +38,41 @@ sleep .5
|
|||
echo "We are done installing the command!"
|
||||
echo ""
|
||||
echo "Simply type wipri -H (as root) or sudo wipri -H to receive help."
|
||||
|
||||
|
||||
|
||||
|
||||
## ADDED FLAG OPTIONS FOR TAILS AND AUTOMATING OTHER OPERATING SYS INSTALLS
|
||||
while getopts "c:" arg; do
|
||||
case $arg in
|
||||
|
||||
# SET COMMAND FOR BOOT INSTALL
|
||||
c)
|
||||
wpcmd=${OPTARG}
|
||||
echo -e "WiPri command for boot chosen: ${RED}$wpcmd${ENDCOLOR}\n"
|
||||
echo "(the following question below can use commands from wipri or wipri-list adding them to boot)"
|
||||
# read -p "What wipri mac address command would you like to start at boot? (ex: wipri -d wlan0 -p): " wpcmd
|
||||
sed -i "13s/.*/ExecStart=$wpcmd/" $wpservicefile
|
||||
sed -i "14s/.*/ExecReload=killall -9 wipri;killall -9 wipri-list;$wpcmd/" $wpservicefile
|
||||
cp wipri.service /etc/systemd/system/wipri.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable wipri.service
|
||||
systemctl start wipri.service
|
||||
echo "WiPri has now been started/added new identity at each boot."
|
||||
echo "Remember not to run conflicting mac address changes at same time as each device only carries 1 mac address per NIC."
|
||||
echo "To stop/disable issue at boot: systemctl stop wipri && systemctl disable wipri."
|
||||
echo "Enjoy your right to privacy [Declared a basic right in United Nations Declaration Of Human Rights]."
|
||||
|
||||
exit
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
## END OF FLAG OPTIONS
|
||||
|
||||
|
||||
echo ""
|
||||
sleep .25
|
||||
echo "Would you like to additionally have wipri change your identity at boot (systemd)?"
|
||||
|
|
Loading…
Reference in New Issue