mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-01 03:38:21 -05:00
fragattack: updated ath9k_htc firmware install script
This commit is contained in:
parent
584e024cb3
commit
26e2797247
@ -1,23 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Make backup of original firmware
|
function install() {
|
||||||
if [[ ! -e /usr/lib/firmware/htc_7010.fw.backup ]];
|
ORIGINAL=$1
|
||||||
|
MODIFIED=$2
|
||||||
|
|
||||||
|
# Create a backup of the original file
|
||||||
|
if [[ ! -e $ORIGINAL.backup ]];
|
||||||
then
|
then
|
||||||
cp /usr/lib/firmware/htc_7010.fw /usr/lib/firmware/htc_7010.fw.backup
|
cp $ORIGINAL $ORIGINAL.backup
|
||||||
cp /usr/lib/firmware/htc_9271.fw /usr/lib/firmware/htc_9271.fw.backup
|
|
||||||
echo "Made backup of original files (old directory)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -e /usr/lib/firmware/ath9k_htc/htc_7010-1.4.0.fw.backup ]];
|
# Overwrite it with the modified firmware image
|
||||||
then
|
cp $MODIFIED $ORIGINAL
|
||||||
cp /usr/lib/firmware/ath9k_htc/htc_7010-1.4.0.fw /usr/lib/firmware/ath9k_htc/htc_7010-1.4.0.fw.backup
|
}
|
||||||
cp /usr/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw /usr/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw.backup
|
|
||||||
echo "Made backup of original files (new directory)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp htc_*.fw /usr/lib/firmware/
|
HTC7010=$(ls /lib/firmware/ath9k_htc/*7010* | grep -v backup)
|
||||||
cp htc_7010.fw /usr/lib/firmware/ath9k_htc/htc_7010-1.4.0.fw
|
HTC9271=$(ls /lib/firmware/ath9k_htc/*9271* | grep -v backup)
|
||||||
cp htc_9271.fw /usr/lib/firmware/ath9k_htc/htc_9271-1.4.0.fw
|
|
||||||
echo "Copied compiled firmware to the system"
|
|
||||||
|
|
||||||
|
for ORIGINAL in $HTC7010
|
||||||
|
do
|
||||||
|
install $ORIGINAL htc_7010.fw
|
||||||
|
done
|
||||||
|
|
||||||
|
for ORIGINAL in $HTC9271
|
||||||
|
do
|
||||||
|
install $ORIGINAL htc_9271.fw
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user