Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Addes Deauth, SD fix to M5sticks amd Song to M5sticks #84

Merged
merged 32 commits into from
Feb 14, 2024

Conversation

bmorcelli
Copy link
Contributor

Fixes

  • Fixed SD card issue, that prevent M5Sticks from boot if SDCARD was declared (sd.h file, setupSdcard function)

New stuff

  • Added Target Deauth functions.
  • Added option to mount/unmount SD Card on M5 sticks, due to the capacity of changing hats without needing to restart the device... The idea is develop more hats, and turn on/off when needed, without flash a new fw.
  • Added Song support to M5Stick+ and +2 (playing 2 octaves up, due to low frequency noises)
  • Added script on the github auto compiler, to add the flags needed to generate binaries when DEAUTHER is turned on
  • Added translation to all these features

New files

  • deauth.h
  • prerequisites folder
    • Added readme to explain how to setup Arduino IDE to use with DEAUTHER
    • Added batch file to automatically do the changes needed into platform.txt
    • Added shell scripts to both Mac and Linux, to automatically do the changes needed into platform.txt

n0xa and others added 21 commits January 27, 2024 00:02
bump up font size in wifi scan
Plus2/Cardputer improvements
Spelling mistake on line 21 - portal.h
Added Attack Menu on Wifi Scan, with Deauth and Beacon Deauth
Added support to SD Card to M5StickC plus 2 (might work on plus anc normal Cs)
Added suport to songs.h to Plus and Plus2 (playing mario theme at start)
added my changelog
Modify trigger and Generate release notes
back to original
Added script to add -w and -zmuldefs to platform.txt on auto build
fixed folder
Copy link
Owner

@n0xa n0xa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting pretty close. I'm going to try building your branch again from my side.

m5stick-nemo.ino Outdated Show resolved Hide resolved
m5stick-nemo.ino Show resolved Hide resolved
@bmorcelli
Copy link
Contributor Author

Nice..

The need to change the file in Arduino IDE is still there for those who want to build from source.

With that in mind I left the instructions in the prerequisites folder, and I managed to make the @vs4vijay auto compiler to apply the changes in "platform.txt" before compiling in GitHub.

bmorcelli and others added 4 commits January 31, 2024 08:30
Added SPEAKER.stop(); at the end of the StickCplus to save energy and play lower freqs
Add Apple Vision Pro
Added Apple Vision Pro (not sure if correct.)
Change line 1084 to   { TXT_BACK, 30},
Added Apple Vision Pro before AppleTV in AppleJuice
@n0xa
Copy link
Owner

n0xa commented Feb 2, 2024

This isn't kicking any of my 2.4GHz-only stuff off my own wifi but I don't mess with deauth much on esp32. I can usually kick my wyze cameras and Particle Photon off pretty easily from the linux command line though.

After running for some minutes, my cardputer reboots with this on the serial monitor:

ESP_ERROR_CHECK failed: esp_err_t 0x101 (ESP_ERR_NO_MEM) at 0x4037fd4c
file: "/home/axon/source/forks/bmor/m5stick-nemo/deauth.h" line 66
func: void wsl_bypasser_send_raw_frame(const uint8_t*, int)
expression: esp_wifi_80211_tx(WIFI_IF_AP, frame_buffer, size, false)

abort() was called at PC 0x4037fd4f on core 1

Backtrace: 0x40377456:0x3fcebd00 0x4037fd59:0x3fcebd20 0x40386529:0x3fcebd40 0x4037fd4f:0x3fcebdc0 0x42004653:0x3fcebde0 0x420046de:0x3fcebe00 0x42006623:0x3fcebe40 0x42009781:0x3fcebe60 0x42023911:0x3fcebe80

ESP32 Exception Decoder renders this stack trace which may or may not help you.

0x40377456: panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c line 408
0x4037fd59: esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c line 137
0x40386529: abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/abort.c line 46
0x4037fd4f: _esp_error_check_failed at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_err.c line 43
0x42004653: wsl_bypasser_send_raw_frame(unsigned char const*, int) at /home/axon/source/forks/bmor/m5stick-nemo/deauth.h line 66
0x420046de: wsl_bypasser_send_deauth_frame(wifi_ap_record_t const*, unsigned char) at /home/axon/source/forks/bmor/m5stick-nemo/deauth.h line 83
0x42006623: deauth_loop() at /home/axon/source/forks/bmor/m5stick-nemo/m5stick-nemo.ino line 1845
0x42009781: loop() at /home/axon/source/forks/bmor/m5stick-nemo/m5stick-nemo.ino line 2273
0x42023911: loopTask(void*) at /home/axon/.arduino15/packages/m5stack/hardware/esp32/2.0.9/cores/esp32/main.cpp line 50

Integration is well done. I'll continue testing on other devices.

Add compatibility to M5Stick Launcher
Updated deauth functions in order to lower the processing while sending packages.

Alse, adjusted delay between packages to 100ms.
@bmorcelli
Copy link
Contributor Author

bmorcelli commented Feb 13, 2024

Whats Up, Noah! I'm sorry for keep you waiting, I was working on my M5Launcher app

I updated the deauth logic and made it simpler, so i shouldn't need so much processing power as it was using before.

Wifi6 networks and mesh network might not work thos deauth... need more study

As I don't have a Cardputer here to test, I will ask you t do the testing :/

@n0xa
Copy link
Owner

n0xa commented Feb 14, 2024

I still can't get it to reliably knock anything of mine offline, but it's more stable and it's a starting point. I'm going to bring it into the develop branch and work it in.

@n0xa n0xa merged commit 403b10f into n0xa:develop Feb 14, 2024
# Full path to the file to be edited
file="$baseFolder/$latestVersion/platform.txt"
backupFile="$baseFolder/$latestVersion/platform.txt.bkp"
prefix="build.extra_flags.esp32"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bmorcelli, Thanks for working on this change. I was looking at the code for deauth. I was just thinking, instead of messing around with platform.txt, if we could update the arduino-cli command on Line No. 157, it would be more readable and maintainable.

e.g.

arduino-cli compile --fqbn ${{ matrix.board.fqbn }} -e \
                              --build-property build.partitions=huge_app \
                              --build-property upload.maximum_size=3145728 \
                              --build-property compiler.cpp.extra_flags="${extra_flags}" \
                              --build-property build.extra_flags.esp32=" -w " \
                              --build-property compiler.c.elf.libs.esp32=" -zmuldefs " \
                              ./m5stick-nemo.ino

I haven't tested this change, Just thinking if this works then we can do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I Was looking Marauders Actions, trying to understand how he modified this platform.txt file... he did this:

 - name: Modify platform.txt
        run: |
          echo "Chicken"
          for i in $(find /home/runner/.arduino15/packages/esp32/hardware/esp32/ -name "platform.txt"); do
            sed -i 's/compiler.c.elf.libs.esp32c3=/compiler.c.elf.libs.esp32c3=-zmuldefs /' "$i"
            sed -i 's/compiler.c.elf.libs.esp32s3=/compiler.c.elf.libs.esp32s3=-zmuldefs /' "$i"
            sed -i 's/compiler.c.elf.libs.esp32s2=/compiler.c.elf.libs.esp32s2=-zmuldefs /' "$i"
            sed -i 's/compiler.c.elf.libs.esp32=/compiler.c.elf.libs.esp32=-zmuldefs /' "$i"
            cat "$i" | grep compiler.c.elf.libs.esp32c3
            cat "$i" | grep compiler.c.elf.libs.esp32s3
            cat "$i" | grep compiler.c.elf.libs.esp32s2
            cat "$i" | grep compiler.c.elf.libs.esp32
          done

I is far more readable and easy to understand.. we just need to change the base folder to the M5Stack current version folder, so we can try this sample:

 - name: Setup platform.txt
        run: |
          for i in $(find /home/runner/.arduino15/packages/m5stack/hardware/esp32/ -name "platform.txt"); do
            sed -i 's/compiler.c.elf.libs.esp32c3=/compiler.c.elf.libs.esp32c3=-zmuldefs /' "$i"
            sed -i 's/compiler.c.elf.libs.esp32s3=/compiler.c.elf.libs.esp32s3=-zmuldefs /' "$i"
            sed -i 's/compiler.c.elf.libs.esp32s2=/compiler.c.elf.libs.esp32s2=-zmuldefs /' "$i"
            sed -i 's/compiler.c.elf.libs.esp32=/compiler.c.elf.libs.esp32=-zmuldefs /' "$i"
            cat "$i" | grep compiler.c.elf.libs.esp32c3
            cat "$i" | grep compiler.c.elf.libs.esp32s3
            cat "$i" | grep compiler.c.elf.libs.esp32s2
            cat "$i" | grep compiler.c.elf.libs.esp32
          done

Copy link
Collaborator

@vs4vijay vs4vijay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC: @n0xa

@bmorcelli
Copy link
Contributor Author

Hey @vs4vijay , Just tryed this on my personal (closed) repo, and unfortunetly it didnt work..

showed many copiler error messages on all devices, and the error that we are trying to avoid ( multiple definition of `ieee80211_raw_frame_sanity_check' ) on cardputer.

As I just pasted the shell code I have for linux env, there are things that can be better written in this part of the code.. I will see what I can do to make it more readable and maintainable.

@vs4vijay
Copy link
Collaborator

Thanks @bmorcelli, I will try this weekend.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants