ReFirmLabs / binwalk

Firmware Analysis Tool
MIT License
10.75k stars 1.54k forks source link

Cannot extract anything from a device, not file #646

Closed jekhor closed 1 week ago

jekhor commented 1 year ago

Binwalk can analyze a device, e.g. /dev/loop0p1 but extraction produces empty result (no files). This is caused by os.path.isfile() check here, what returns False for any device nodes: https://github.com/ReFirmLabs/binwalk/blob/master/src/binwalk/modules/extractor.py#L634

Changing isfile() to exists() makes extraction working.