bri3d / VW_Flash

Flashing tools for VW AG control units over UDS. Compression, encryption, RSA bypass, and checksums are supported for Simos18.1/6/10, DQ250-MQB, DQ381-MQB, and Haldex4Motion-Gen5-MQB.
Other
299 stars 77 forks source link

extractodx: Create outdir if not present #122

Open JaCzekanski opened 5 months ago

JaCzekanski commented 5 months ago

Allows binaries to be extracted to --outdir without having to manually create it.

Before

$ python extractodx.py --file ../FL_3Q0980654_X921.odx --outdir ../X921/
FD_7000FLASHDATA
Traceback (most recent call last):
  File "/Users/jakubczekanski/Downloads/3q0/VW_Flash-master/extractodx.py", line 225, in <module>
    with open(os.path.join(args.outdir, data_block), "wb") as dataFile:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../X921/FD_7000FLASHDATA'

After

$ python extractodx.py --file ../FL_3Q0980654_X921.odx --outdir ../X921/
FD_7000FLASHDATA
FD_8000FLASHDATA
JaCzekanski commented 3 months ago

@bri3d Are you okay with this patch? Please merge it when you find the time. I don't have the permission to close&merge it.

Screenshot 2024-03-20 at 21 28 05