-
-
Notifications
You must be signed in to change notification settings - Fork 93
/
deauth_setup.sh
executable file
·41 lines (29 loc) · 1.6 KB
/
deauth_setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Define paths with proper home expansion
pio pkg install -p espressif32 -t toolchain-xtensa32
esp32_file="$HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/lib/libnet80211.a"
esp32s3_file="$HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/lib/libnet80211.a"
esp32_file_temp="$HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/lib/libnet80211_temp.a"
esp32s3_file_temp="$HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/lib/libnet80211_temp.a"
# Definir caminhos para as ferramentas objcopy
toolchain_esp32="$HOME/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/bin/objcopy"
toolchain_esp32s3="$HOME/.platformio/packages/toolchain-xtensa-esp32s3/xtensa-esp32s3-elf/bin/objcopy"
# Verificar se os arquivos existem antes de executar os comandos
if [[ -f "$esp32_file" && -f "$esp32s3_file" ]]; then
# Execute objcopy commands for ESP32
$toolchain_esp32 --weaken-symbol=ieee80211_raw_frame_sanity_check "$esp32_file" "$esp32_file_temp"
# Rename the original file to .old
mv "$esp32_file" "${esp32_file}.old"
# Rename the _temp to original
mv "$esp32_file_temp" "$esp32_file"
# Execute objcopy commands for ESP32-S3
$toolchain_esp32s3 --weaken-symbol=ieee80211_raw_frame_sanity_check "$esp32s3_file" "$esp32s3_file_temp"
# Rename the original file to .old
mv "$esp32s3_file" "${esp32s3_file}.old"
# Rename the _temp to original
mv "$esp32s3_file_temp" "$esp32s3_file"
echo "Done."
else
echo "One or more specified files were not found."
exit 1
fi