CTXz / stm32f1-picopwner

Dump read-out protected STM32F1's with a Pi Pico - A Pi Pico implementation of @JohannesObermaier's, Marc Schink's and Kosma Moczek's Glitch and FPB attack to bypass RDP (read-out protection) level 1 on STM32F1 chips
181 stars 25 forks source link

Blank in path name occurs error loading #3

Closed JimKnopfIoT closed 1 year ago

JimKnopfIoT commented 1 year ago

I installed stm32f1-picopwner on a dualboot Notebook using a folder on sda1 (Linux)/drive E:(Windows) which has a blank in it's foldername. When executing

  python3 dump.py -p /dev/ttyACM0 -o dump.bin

i get this error:

Traceback (most recent call last):
File "/...[...].../stm32f1-picopwner/dump.py", line 479, in <module>
    upload_target_fw(get_target_fw_bin(args.targetfw, sram_entry_point, usart))
File "/media/...[...].../stm32f1-picopwner/dump.py", line 295, in upload_target_fw
    raise Exception(
Exception: Failed to load target firmware to SRAM
openocd output: Error: Invalid command argument

After removing the blank or moving the stm32f1-picopwner directory to another directory without a space in the pathname, it works as expected.

Please add test for spaces in path name and escape sequence for spaces in path names.

CTXz commented 1 year ago

Fixed in https://github.com/CTXz/stm32f1-picopwner/commit/d434d7b8baba843e9e3938fcf29799157735fe53

Thanks for reporting the issue!