Open ElVasquito opened 3 years ago
If you're under Linux can enter into ELF executables by Ctrl+PgDown - there is 'inside' plugin that handles ELF and some other formats. If you're under MacOS - ops, not implemented yet. Libarchive used in multiarch also supports various of formats for reading: https://github.com/libarchive/libarchive/wiki/LibarchiveFormats
Thank you, yes, MultiArc with Libarchive is great, but disk images are not supported and it is very useful to get inside them in Far to view/extract data directly.
Potentially it can be done by using libguestfs (https://en.wikipedia.org/wiki/Libguestfs), but to be honest doesnt looks as something that will be added tomorrow..
Didn't know about that library. Sounds great, even supporting write to the images! However, I find ArcLite would be more useful as it supports many more formats to get "inside" from Far. Would ArcLite be more difficult to port? Please do consider to setup a "donations" page. Thank you for the work you've done!
What you mean 'many more formats to get "inside" from Far.' ? As i already wrote, there is far2l-specific plugin named 'inside' it also supports decoding some formats, and it a bit configurable, see: https://github.com/elfmz/far2l/blob/master/inside/configs/plug/config.ini Regarding ArcLite - it uses 7z.dll, and there is such librry in repos. If to consider sources of 7z app itself, its code is very.. singular:) Its problem that 7z engine was not designed to be library. So for porting it would be best to be an author of 7z:) and still see no exclusive benefits. Also i always afraid of files longer than 1k lines, like this https://github.com/FarGroup/FarManager/blob/master/plugins/arclite/ui.cpp and this https://github.com/FarGroup/FarManager/blob/master/plugins/arclite/archive.cpp. Multiarc code is much more laconic, even thought also much more legacy, but when porting code - simplicity rules. And as you noted - libguestfs is more powerful than ArcLite for images support, libarchive is somewhat similar for archives support.. Well, it has weaker 7z support but stronger .tar. support that is perfectly fine for *nix file manager.
Quote from its webpage: "libguestfs can access almost any disk image imaginable." Well, I did not see CramFS/SquashFS images mentioned anywhere in the page, and after reading the supported 7z formats:
Supported formats:
Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z.
I thought about that line :) Now that I actually downloaded the library's tarball and checked it, I found this: Add cramfs and squashfs kernel modules (RHBZ#503135). So yes they should be supported :) Understand about those big files, a pain in the butt, let's forget it. Libguestfs would definitely be much more useful for Far, and MultiArc+Inside are perfectly fine as is.
Personally, it would be very, very useful for me to have libgestfs supported in multiarc to open VDI images of Virtualbox, in which I often build far2l for different distributions.
@elfmz well, where custom.ini for multiarc should be placed? Want to try to add VDI support through command line 7z
via custom format support in multiarc
~/.config/far2l/multiarc/custom.ini ..hope it still works. Never tested since ported ;)
Thanks, it works perfectly! As i found out, another option is to place custom.ini
in same folder with multiarc.far-plug-mb (for example, /usr/lib/far2l/Plugins/multiarc/plug/
) for any user to be able to use it.
Here is config for VirtualBox .vdi image file format. Don't forget to install p7zip-full package (sudo apt install p7zip-full
on Ubuntu/Debian).
[VDI]
TypeName=VDI
;00000000 3c 3c 3c 20 4f 72 61 63 6c 65 20 56 4d 20 56 69 |<<< Oracle VM Vi|
;00000010 72 74 75 61 6c 42 6f 78 20 44 69 73 6b 20 49 6d |rtualBox Disk Im|
;00000020 61 67 65 20 3e 3e 3e 0a 00 00 00 00 00 00 00 00 |age >>>.........|
ID=3c 3c 3c 20 4f 72 61 63 6c 65 20 56 4d 20 56 69 72 74 75 61 6c 42 6f 78 20 44 69 73 6b 20 49 6d 61 67 65 20 3e 3e 3e 0a
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
; ;------------------- ----- ------------ ------------ ------------------------
; ;2021-01-10 14:01:40 ..... 67108864 67108864 [SYS]/Journal
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
Could this VDI support be please added as default? Thanks!
That's very nice @unxed! Attached sample images, the "custom.img" and "romfs.img" are CramFS images, the bigger "user-x*.img" is a SquashFS image. firm.zip
That's very nice @unxed! Attached sample images, the "custom.img" and "romfs.img" are CramFS images, the bigger "user-x*.img" is a SquashFS image. firm.zip
[CRAMFS]
TypeName=CRAMFS ; squashfs supported also
;00000000 27 05 19 56 c3 13 2b a2 5f c5 db d2 00 03 ff c0 |'..V..+._.......|
ID=27 05 19 56
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
; ;------------------- ----- ------------ ------------ ------------------------
; ;2021-01-10 14:01:40 ..... 67108864 67108864 [SYS]/Journal
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
Full set:
[VDI]
TypeName=VDI
;00000000 3c 3c 3c 20 4f 72 61 63 6c 65 20 56 4d 20 56 69 |<<< Oracle VM Vi|
;00000010 72 74 75 61 6c 42 6f 78 20 44 69 73 6b 20 49 6d |rtualBox Disk Im|
;00000020 61 67 65 20 3e 3e 3e 0a 00 00 00 00 00 00 00 00 |age >>>.........|
ID=3c 3c 3c 20 4f 72 61 63 6c 65 20 56 4d 20 56 69 72 74 75 61 6c 42 6f 78 20 44 69 73 6b 20 49 6d 61 67 65 20 3e 3e 3e 0a
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
; ;------------------- ----- ------------ ------------ ------------------------
; ;2021-01-10 14:01:40 ..... 67108864 67108864 [SYS]/Journal
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[VHD]
TypeName=VHD
;00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........|
ID=63 6f 6e 65 63 74 69 78
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
; ;------------------- ----- ------------ ------------ ------------------------
; ;2021-01-10 14:01:40 ..... 67108864 67108864 [SYS]/Journal
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[VMDK]
TypeName=VMDK
;00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 00 00 01 |KDMV............|
ID=4b 44 4d 56
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
; ;------------------- ----- ------------ ------------ ------------------------
; ;2021-01-10 14:01:40 ..... 67108864 67108864 [SYS]/Journal
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[CRAMFS]
TypeName=CRAMFS
;00000000 27 05 19 56 c3 13 2b a2 5f c5 db d2 00 03 ff c0 |'..V..+._.......|
ID=27 05 19 56
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
; ;------------------- ----- ------------ ------------ ------------------------
; ;2021-01-10 14:01:40 ..... 67108864 67108864 [SYS]/Journal
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[SQUASHFS1]
TypeName=SQUASHFS1
;sqsh
ID=73 71 73 68
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[SQUASHFS2]
TypeName=SQUASHFS2
;qshs
ID=71 73 68 73
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[SQUASHFS3]
TypeName=SQUASHFS3
;hsqs
ID=68 73 71 73
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[SQUASHFS4]
TypeName=SQUASHFS4
;shsq
ID=73 68 73 71
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[FLOPPY]
TypeName=FLOPPY
;00000000 eb 3c 90 4d 53 44 4f 53 35 2e 30 00 02 01 01 00 |.<.MSDOS5.0.....|
ID=eb 3c 90
IDOnly=1
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
; ;------------------- ----- ------------ ------------ ------------------------
; ;2021-01-10 14:01:40 ..... 67108864 67108864 [SYS]/Journal
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[IMG]
TypeName=IMG ; raw disk image; 7z can not extract whose, but we may at least list files
ID=eb ff 07 00
IDPos=1040
IDOnly=1
List="fls -pru" ; needs 'sudo apt install sleuthkit' on Debian/Ubuntu
; ;r/r 393218: test/test.txt
Format0="* * nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Added floppy images support
Works a dream!! Makes life easier :) Thanks so much!!!
@elfmz can multiarc please be updated to allow multiple IDs per section (process-if-any-is-present logic)? This would make code above much tighter :)
Something like ID0=eb 3c 90 ID1=27 05 19 56 etc
Going a little further, we can separate the [un]packer description from the format description. That is, first we describe the unpacker (command lines, output format), and then describe all the formats it understands.
@ElVasquito added better SquashFS support, please update :)
@elfmz can multiarc please be updated to allow multiple IDs per section (process-if-any-is-present logic)? This would make code above much tighter :)
Added. ID=eb 3c 90 ID1=27 05 19 56 ID2=ff aa cc ee .. Also regarding your changes - it seems all your signatures located in beginning of file - so please add IDPos=0 for each format. (Also ID1Pos=0 ID2Pos=0 etc wherever you gonna put multiple IDs). Unspecified IDPos makes multiarc to scan whole bunch of file data and thats can be quite slow and may produce false-detection of image formats
..did that myself, also added ID1.. for SQUASHFS but i dont have test samples for that also there were some bugs caused random crashes due to custom.ini being used, fixed them too
Everything except squashfs and floppy is here.
floppy image sample cdboot2.zip
..did that myself, also added ID1.. for SQUASHFS but i dont have test samples for that also there were some bugs caused random crashes due to custom.ini being used, fixed them too
Now it can be compacted even further. Also ToolNotFound is working for all image types now:
[7ZDISKIMAGE]
TypeName=7ZDISKIMAGE
;
;VDI
;00000000 3c 3c 3c 20 4f 72 61 63 6c 65 20 56 4d 20 56 69 |<<< Oracle VM Vi|
;00000010 72 74 75 61 6c 42 6f 78 20 44 69 73 6b 20 49 6d |rtualBox Disk Im|
;00000020 61 67 65 20 3e 3e 3e 0a 00 00 00 00 00 00 00 00 |age >>>.........|
ID=3c 3c 3c 20 4f 72 61 63 6c 65 20 56 4d 20 56 69 72 74 75 61 6c 42 6f 78 20 44 69 73 6b 20 49 6d 61 67 65 20 3e 3e 3e 0a
IDPos=0
;VHD
;00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........|
ID1=63 6f 6e 65 63 74 69 78
ID1Pos=0
;VMDK
;00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 00 00 01 |KDMV............|
ID2=4b 44 4d 56
ID2Pos=0
;CRAMFS
;00000000 27 05 19 56 c3 13 2b a2 5f c5 db d2 00 03 ff c0 |'..V..+._.......|
ID3=27 05 19 56
ID3Pos=0
;SQUASHFS sqsh
ID4=73 71 73 68
ID4Pos=0
;SQUASHFS qshs
ID5=71 73 68 73
ID5Pos=0
;SQUASHFS hsqs
ID6=68 73 71 73
ID6Pos=0
;SQUASHFS shsq
ID7=73 68 73 71
ID7Pos=0
;FLOPPY
;00000000 eb 3c 90 4d 53 44 4f 53 35 2e 30 00 02 01 01 00 |.<.MSDOS5.0.....|
ID8=eb 3c 90
ID8Pos=0
;
IDOnly=1
ToolNotFound=Please install 7z utility to open this archive
List="7z l -- %%AQ"
Start="------------------- ----- ------------ ------------ ------------------------"
End="------------------- ----- ------------ ------------ ------------------------"
Format0="yyyy-tt-dd hh:mm:ss aaaaa zzzzzzzzzzzz pppppppppppp nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=7z x {-p%%P} -r0 -y -- %%A @%%LQMN
ExtractWithoutPath=7z e {-p%%P} -r0 -y -- %%A @%%LQMN
Test=7z t {-p%%P} -r0 -- %%A @%%LQMN
AllFilesMask="*"
[IMG]
TypeName=IMG ; raw disk image; 7z can not extract whose, but we may at least list files
ID=eb ff 07 00
IDPos=1040
IDOnly=1
ToolNotFound=Please install fls utility to view contents of this archive
List="fls -pru" ; needs 'sudo apt install sleuthkit' on Debian/Ubuntu
; ;r/r 393218: test/test.txt
Format0="* * nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
squashfs sample: https://mirror.one.com/archlinux/iso/2021.01.01/archlinux-2021.01.01-x86_64.iso -> arch/x86_64/airootfs.sfs
..did that myself, also added ID1.. for SQUASHFS but i dont have test samples for that also there were some bugs caused random crashes due to custom.ini being used, fixed them too
Now it can be compacted even further. Also ToolNotFound is working for all image types now:
Now that this is merged may we close the issue finally? Or should we left it open for other people who need some format that arclite supports through 7zip, but far2l still has no corresponding signature?
RAW disk image files support was completely wrong, rewritten. Now even supports extraction of individual files :)
@elfmz please update
Sample image for testing: NewVirtualDisk.zip
[IMG]
TypeName=IMG
ID=00 00 00 00
IDPos=0
Extension=img
ToolNotFound=Please install fls and icat utilities to open this archive
List="fls -prul %%AQ | grep r/r"
;r/r 13: test/test.txt 2021-02-25 03:25:59 (MSK) 2021-02-25 03:26:01 (MSK) 2021-02-25 03:25:59 (MSK) 0000-00-00 00:00:00 (UTC) 3 1000 1000
Format0="/^r\/r\s\d+:\t(?P<name>.*?)\t(?P<mYear>\d+)-(?P<mMonth>\d+)-(?P<mDay>\d+)\s(?P<mHour>\d+):(?P<mMin>\d+):(?P<mSec>\d+)\s\(\w+\)\t\d+-\d+-\d+\s\d+:\d+:\d+\s\(\w+\)\t\d+-\d+-\d+\s\d+:\d+:\d+\s\(\w+\)\t\d+-\d+-\d+\s\d+:\d+:\d+\s\(\w+\)\t(?P<size>\d+)/"
ExtractWithoutPath=icat %%AQ $(fls -pru %%AQ | grep -P '\t%%f$' | cut -d':' -f1 | grep -o '[0-9]\+') > %%fQW
Minor issue: if image file is broken, ToolNotFound is still shown, even if utility is actually installed.
Sample for testing: 1234.zip
Another minor issue: this squashfs image filelisting fails. Command line 7z lists ok. I can't understand what's the matter.
for me filelisting works, but uImage file extraction shows error but still file extracted
for me filelisting works, but uImage file extraction shows error but still file extracted
reproducable on Ununtu Server 18.04 x64 with lastest master, for example
upd: on 20.04 with far2l from ppa reproducable also
check now
check now
"Minor issue: if image file is broken, ToolNotFound is still shown, even if utility is actually installed." is fixed now, thanks!
..and uImage.img listing?
..and uImage.img listing?
really fixed, hurray!
another multiarc's custom format related issue: #930
another multiarc's custom format related issue: #930
up :)
I don't know if this last one can be ported though, as it's made in Pascal.
https://github.com/unxed/far2l-fpc-helloworld Sample far2l plugin in Pascal
Hash/CRC
Good news: hash calculation units required by this plugin are compatible with Free Pascal Compiler and Linux, if use versions from PeaZip.
But unit itself has some problems compiling. Most of them caused by direct WinAPI usage or some kind of incompatibilities between compilers. Here is Work-In-Progress code, feel free to experiment with it: as I am doing it just for fun, there is no guarantee that I will continue porting and/or ever finish this work. HashCRC_far2l_WIP.tar.gz
sudo apt install fpc
fpc hashcrc.dpr
About porting arclite. Even recent linux 7zip versions (7zz tool found in 7zip package in Debian/Ubuntu) have charset problems fixed in far2l's multiarc long, long time ago.
Related 7zip issue: https://sourceforge.net/p/sevenzip/bugs/2473/
@spvkgn @akruphi
Any chance of having those plugins? The one I really miss is ArcLite, as it can get inside many file formats: disk images (floppy/CramFS/SquashFS/VDI/VMDK...), executables, and many more containers, and extract data out of them very easily. Hash/CRC calculator: https://plugring.farmanager.com/plugin.php?pid=695&l=en I don't know if this last one can be ported though, as it's made in Pascal.
Many thanks in advance.