Page 1 of 16

UExtract-4.2

Posted: Tue 06 Aug 2013, 10:02
by SFR
In order to ease unpacking of various archive formats, I forged One Script to Rule Them All (well, at least most of them :wink: ).

It's packaged as a ROX right-click app, but the script itself (/usr/local/apps/UExtract/uextract) can be used from command line.
For example - to extract 'archive.tar.gz', 'arch2.7z' and 'somepkg.rpm' from current dir to /root/somedir:

Code: Select all

uextract -o /root/somedir archive.tar.gz arch2.7z somepkg.rpm
Same thing can be done via 'right-click -> Open With -> UExtract'.
BTW, each archive will be always extracted to a separate subdirectory!
___________

UExtract can make use of the following tools:
  • 7z
  • aescrypt
  • ar
  • arj
  • avconv/ffmpeg
  • balz
  • base64
  • bbb
  • blkar
  • bcrypt
  • brotli
  • b(un)zip2
  • c1541
  • ccrypt
  • cpio
  • cryptsetup
  • dar
  • ddjvu
  • dpkg-deb
  • dzip
  • exploderpm
  • extract_chmLib
  • extract-ikconfig
  • fdisk
  • flzp
  • fossil
  • fp8
  • fsbext
  • fusecompress_offline
  • gdisk
  • gifsicle
  • gostcrypt
  • gpg/gpg2
  • gs
  • g(un)zip
  • kgb
  • ha
  • hexbin
  • hlextract
  • icotool
  • innoextract
  • lbrate
  • lepton
  • lha
  • lizard
  • losetup
  • lpaq1
  • lpaq8
  • lr(un)zip
  • lz4
  • lz4jsoncat
  • lzfse
  • lzip
  • mcrypt
  • MPQExtractor
  • msgunfmt
  • nanozip
  • nomarch
  • nulib
  • paq8l
  • paq8n
  • paq8o
  • pdfdetach
  • pdfimages
  • pdftocairo
  • pdftotext
  • php
  • poweriso
  • qemu-nbd
  • quad
  • ripmime
  • rpm2cpio
  • r(un)zip
  • scrypt
  • snzip
  • sqlite3
  • steghide
  • stripttc
  • swfextract
  • tar
  • tnef
  • tor
  • tosz
  • truecrypt
  • unace
  • unadf
  • unalz
  • (un)arc
  • (un)asd
  • (un)compress
  • uncpk
  • undms
  • unegg
  • (un)freeze
  • (un)lzma
  • (un)lzop
  • unlzx
  • unp64
  • unpack200
  • (un)rar
  • unsquashfs
  • (un)xz
  • unzip
  • upx
  • uudecode
  • veracrypt
  • wvunpack
  • xar
  • xcur2png
  • xxdecode
  • zimdump
  • zoo
  • zpaq
  • zstd
  • zxing
  • zzip
Supported, though not extensively tested, formats/extensions are:

.??_ .2fs .3fs .3g2 .3gp .4fs .7z .7z.001 .7zip .a .a[0-9][0-9] .a2theme .ace .acp .actc .adf .adz .aes .ai .alz .amf .ani .apk .aplp .app .appimage .apz .ar .arc .arch00 .arduboy .arj .ark .asc .asd .asf .atz .au .avastsounds .avi .azw2 .b64 .baklz4 .balz .bau .bbb .bdoc .bfe .bgz .bin .blend .bmp .bmz .bootskin .br .btrfs .bxy .bz .bz2 .bzip .bzip2 .cab .capx .catrobat .cb7 .cba .cbb .cbg .cbr .cbt .cbz .cdmtz .cdmz .cfs .cgz .chm .chrt .cl2arc .cld .cpgz .cpio .cpio.7z .cpio.br .cpio.bz .cpio.bz2 .cpio.bzip .cpio.bzip2 .cpio.f .cpio.gz .cpio.gzip .cpio.lrz .cpio.lz .cpio.lz4 .cpio.lzma .cpio.lzo .cpio.xz .cpio.z .cpio.zip .cpio.zst .cpk .cpl .cpt .cptl .cptx .cramfs .crf .crx .ctb .ctx .ctz .cur .curtainsstyle .curxptheme .cvd .cxarchive .d64 .d81 .daa .dar .dat .dazip .db .db3 .dbk .deb .depot.gz .deskthemepack .dia .disk .divx .djvu .dll .dmg .dms .docm .docx .dotx .dsk .dsl .dxpack .dz .ear .eaz .ecs .ecsbx .efi .efossil .eftx .egg .emerald .eml .emz .eopkg .epk .epub .esriaddin .exe .ext2 .ext3 .ext4 .f .f3d .f3z .f4v .fat .fb2k-component .fcstd .flac .flf .flp .flv .flzp .fomod .fossil .fp8 .fsb .fsl .fwp .fzbz .fzpz .fzz .g3x .gadget .gc .gcf .gem .gg .gif .gifar .gmz .gnumeric .gnutar .goomod .gpg .gps .graphmlz .gst .gszip .gtar .gtp .gz .gz2 .gzi .gzip .h264 .ha .hc .hevc .hfs .hfv .hid .hme .hmxz .honmod .hqx .htmlz .htz .hwp .i5z .iar .icl .icmod .icns .ico .igz .ima .image .img .imz .ip .ipa .ipcc .ipg .ipk .ipsw .iso .ita .itz .iwd .ja .jar .jgz .jic .jpeg .jpg .jsonlz4 .jwpub .key .kfo .kgb .kmz .kpr .ksf .ksp .kwd .lbr .lca .lemon .lep .lha .libzip .little .liz .lnx .love .lpaq1 .lpaq8 .lpk .lpkg .lrz .luks .lxf .lz .lz4 .lza .lzfse .lzh .lzm .lzma .lzo .lzx .m2s .m2ts .m2v .m4v .maff .mar .mbox .mbx .mbz .mcaddon .mcgame .mcpack .mct .mcworld .mdf .mds .mdz .mdzip .mepx .mga .mht .mhtml .mim .mime .mkv .mmip .mo .mov .mozlz4 .mp3 .mp4 .mpeg .mpg .mpk .mpkg .mpq .mpz .mpzip .mscz .msg .msi .msp .msu .msz .mtf .mts .mtz .mxf .mxl .mxskin .mzp .mzz .nbf .nbm .nc .ndr .nex .nfl .ngr .nif .nlr .nrg .nsis .ntfs .nth .numbers .nupkg .nz .oar .obt .odb .odc .odf .odg .odi .odm .odp .ods .odt .oex .ogg .ogv .ogz .oiv .onepkg .opk .orb .osk .otg .oth .otp .ots .ott .ova .ovp .oxps .oxt .p2s .p2s.backup .pack .package .pages .pak .paq8l .paq8n .paq8o .par .pat .pax .pbi .pbp .pcv .pdf .pdmod .pet .pfs .pgp .phar .pigm .pigs .pisi .piz .pk3 .pk4 .pkg .pkz .pmlz .png .potx .ppsm .ppsx .pptm .pptx .prg .psz .pup .pvga .pxz .qch .qcow .qcow2 .qcow2c .qpk .qpr .qtz .quad .quiz .r[0-9] .r[0-9][0-9] .rar .rar5 .reaperthemezip .rjs .rmskin .rp9 .rpm .rsn .rub .run .rz .s3z .safariextz .sam .sar .sb .sb2 .sb3 .sbsar .sbx .sc2archive .sc2assets .sc2data .sc2ma .sc2mod .scdoc .scm .scr .sdi .sdk .sdt .sdz .sfe .sfg .sfs .sfx .sh .sh2 .sh3d .sh3f .sh3t .shar .shk .shr .sifz .sjr .skz .sle .slm .slp .smskin .smt .smzip .snap .snappy .snz .sob .soundpack .sox .spack .spk .spm .sprite2 .sprite3 .sqf .sqfs .sqlar .sqlite .sqlite3 .sqlitedb .sqsh .squashfs .srm .stc .std .sti .stpz .studyarch .stw .styx .sublime-package .sue .svgz .swc .swf .swm .sxc .sxd .sxg .sxi .sxm .sxw .sys .sz .tar .tar.7z .tar.br .tar.bz .tar.bz2 .tar.bzip .tar.bzip2 .tardist .tar.f .tar.gz .tar.gz2 .tar.gzip .tar.lrz .tar.lz .tar.lz4 .tar.lzma .tar.lzo .tar.md5 .tar.xz .tarz .tar.z .tar.zip .tar.zst .taz .tazpkg .tb2 .tbz .tbz2 .tc .tce .tcel .tcem .tcx .tcz .tg .tgz .themepack .thm .thmx .tlrz .tlz .tlz4 .tlzma .tnef .tor .tpkg .tpxz .tpz .ts .ts4script .tsk .tsz .ttc .twz .twzip .txz .tz .tzma .tzo .tzst .u .u3p .uax .udeb .udf .unitypackage .upx .usdz .usfs .ustar .utf .utz .uu .uue .vbox-extpack .vc .vdi .vfd .vgz .vhd .vlt .vmdk .vmg .vob .vp6 .vpk .wa .wal .war .wav .wba .wbm .wbm.gz .webm .webz .wgt .wgz .whl .widget .wim .wlz .wma .wmd .wmga .wmv .wmz .wot .wotmod .wrz .wsp .wsz .wtv .wv .x3d .xap .xapk .xar .xbps .xcfbz2 .xcfgz .xjt .xjtbz2 .xjtgz .xlam .xlsm .xlsx .xltx .xmcdz .xmz .xo .xpi .xps .xrns .xsn .xwp .xx .xxe .xz .xzm .z .z[0-9][0-9] .zab .zabw .zad .zds .zfsendtotarget .zi .zi_ .zim .zip .zipx .zl .zlib .zm9 .zoo .zpaq .zpi .zst .ztd .zxp .zz
_______________

UExtract contains the following translations:
- Polish (me)
- Russian (Sender & Pro) [needs updating]
- German (L18L)
- Spanish (nilsonmorales & vicmz)
- French (Argolance) [needs updating]
- Dutch (foxpup) [needs updating]
_______________

You may also want to try PackIt.

Happy extracting &
Greetings!

Posted: Tue 06 Aug 2013, 11:40
by Jasper
Hi SFR,

I'm running Precise 5.6 and having installed 7z (full) then using right-click on a few different file types - all went well until I right-clicked on the Windows/Wine .exe file below.

I'm not sure if -after deleting the final three (.gz) characters- it is possible to unpack it (especially if it is effectively already a single file as opposed to a directory of files).

My regards and thanks

Posted: Tue 06 Aug 2013, 12:14
by SFR
Hey Jasper, thank you for the report.

No, this one seems not to be a self-extracting archive, so UExtract/7z won't handle it.
Strangely, even ResourceHacker (under Wine) can't open this file, maybe it's too old:

Code: Select all

# file Bcalc.exe 
Bcalc.exe: MS-DOS executable, NE for MS Windows 3.x
# 
Greetings!

Posted: Tue 06 Aug 2013, 13:52
by sc0ttman
in akita, 7z is a symlink to 7zr, which is a static bin around 200kb - can't remember where i got it though... not sure if it meets the requirements..

EDIT: terminal says 7-Zip (A) 4.58 beta

anyway, the command line works fine, with -o . file1 file2 file3

i tested gzipped pets, .tar.xz, sfs3 (gzipped), and tar.bz2 .. all worked :)

but before anything would work through ROX, the AppRun needed to be changed to rxvt from urxvt ... maybe a check in AppRun to see which terminal to use?

I tested with mrxvt, rxvt, .. worked fine.. termit didn't ..
termit just shows the uextract error you get when it receives no options..

I love this, BTW.. so many formats supported..

EDIT2: Where does the support for xz compressed pets and sfs files reside? Within your script or within the pet2tgz/dir2sfs script in various puppies themselves? I don't have any to test in akita, but presume they would not be supported, as I didn't 'backport' those updates from woof, IIRC..

Posted: Tue 06 Aug 2013, 15:31
by Karl Godt
Have posted already in abushcrafter's Improving The Wrappers From Xarchive http://www.murga-linux.com/puppy/viewtopic.php?t=56651 so I know what's that all about .

SFR :
The code looks really fine !

Have not tested it, but (probably)will if xarchive or pupzip fails .

( Had no clue to get 7z to compile that time, but will look into my archives - still running Puppy-4.3)

Posted: Tue 06 Aug 2013, 15:49
by SFR
Hey Sc0ttman
but before anything would work through ROX, the AppRun needed to be changed to rxvt from urxvt ... maybe a check in AppRun to see which terminal to use?
D'oh! It was supposed to be 'xterm', not 'urxvt' there. :roll:
Thanks for pointing this out.
'xterm' script in Akita is hardcoded to use 'rxvt', so should be ok now.
EDIT2: Where does the support for xz compressed pets and sfs files reside? Within your script or within the pet2tgz/dir2sfs script in various puppies themselves? I don't have any to test in akita, but presume they would not be supported, as I didn't 'backport' those updates from woof, IIRC..
I don't think it's in Woof - the only Puppy I know that supports xz compressed .pets is FatDog (but I might be wrong).
I tested Uextract with this .pet:
http://www.murga-linux.com/puppy/viewtopic.php?t=82734
BTW UExtract-0.9 won't extract xz compressed pets in Akita anyway, but I fixed this in v0.91.
in akita, 7z is a symlink to 7zr, which is a static bin around 200kb - can't remember where i got it though... not sure if it meets the requirements..
I just checked and this 7zr is also some cutted down version.
It didn't work for me with: .rpm, .xrns, .a, .arj, .lha, .cab (and probably some others, which I don't have at hand to test).
As for .rpm it _could_ be replaced with rpm2cpio, but the busybox version doesn't support LZMA compression, that's why I've chosen 7z.
Karl Godt wrote:Have posted already in abushcrafter's Improving The Wrappers From Xarchive http://www.murga-linux.com/puppy/viewtopic.php?t=56651 so I know what's that all about .

SFR :
The code looks really fine !

Have not tested it, but (probably)will if xarchive or pupzip fails .

( Had no clue to get 7z to compile that time, but will look into my archives - still running Puppy-4.3)
Thank you Karl!
As for that thread - I vaguely recall I've seen it before, but I never explored it - I have to see if there are some things that could be incorporated into UExtract.

Version 0.91 uploaded, see the first post.

Thanks for testing &
Greetings!

Posted: Wed 07 Aug 2013, 10:17
by SFR
Update: version 0.92

Reading through the thread that Karl posted link to, I noticed a script posted by Amigo, so I added some formats from there to UExtract:
.cbt
.cpio.lzma
.cpio.7z
.cpio.z
.cpio.gz
.cpio.bz
.cpio.bz2
.tar.z

Other new formats (all handled by 7z):
.chm
.cramfs
.dmg
.fat (not tested, could not find/create one)
.msi
.vhd
.wim

And:
.pup (just the 1st stage, i.e. unzipping to these 3 'dotpup.tar.gz' 'dotpup.sh' and 'md5sum.txt' files)

Note: some of these (and previous) formats are not directly accessible through the main level of right-click menu.
In such cases, use "Open With/Send To" submenu.

What else:
- support for .7z multi-part archives (archive.7z.001 ...)
- if given extension is not supported, don't exit, but instead try to use 7z on it.
- in a bit hacky way, but I also added '-l' parameter that lists all supported extensions

Version 0.92 uploaded, see the first post!

Greetings!

Posted: Thu 08 Aug 2013, 17:20
by SFR
Ok, no further problems reported, so let's make it 1.0:
- added: '-d' option - dependency check
- changed: output directory will be named 'fullarchname_extracted', e.g.: 'archive.tar.gz' will become 'archive.tar.gz_extracted'

First post updated!

Greetings!

Posted: Thu 08 Aug 2013, 18:29
by Jasper
Hi again SFR,

Your v 1.0 seems to be working well with Precise 5.6, but as I didn't see the new -d option and as I don't really understand its use (my deficiency) would you kindly explain it in a bit more detail?

My regards and thanks

Addendum:

Thank you for your explanation below. Now I understand how to use it - your -d option is a final touch which is both useful and welcome; especially for non-slacko users.

Posted: Thu 08 Aug 2013, 18:53
by SFR
Hi Jasper

This option is available only through command line, see screenshot.
BTW, just type uextract to display short help msg. :wink:

Greetings!

Posted: Mon 12 Aug 2013, 12:52
by SFR
Update, version 1.1

- New formats/extensions:
  • .b64
  • .bfe (not an archive - it's encrypted file created with bcrypt)
  • .cb7
  • .cpio.lzo
  • .cpio.xz
  • .j
  • .ja
  • .little (??? - found in .mozilla dir, but it's .zip really)
  • .lzh
  • .maff
  • .mht (handled by my own, crude routine - extracts only base64 encoded stuff from .mht web archives)
  • .sb (Slax module)
  • .xpi
  • .xzm (Porteus module)
  • .zi (renamed .zip)
  • .zpi (renamed .zip)
- .sfs (as well as .xzm and .sb) images are now being extracted directly, using unsquashfs4, which is lot faster than mounting'n'copying
- Minor internal improvements

First post updated!

Greetings!

Posted: Tue 20 Aug 2013, 20:13
by SFR
Update, version 1.2

New formats/extensions:
.apk
.bau
.cpl
.crx
.dll
.ear
.nsis
.otp
.otg
.ots
.ott
.pdf (uses 'pdftotext' and 'pdfimages' to extract text & pictures; rather experimental)
.pk3
.pk4
.slp
.sob
.swm
.stw
.tar.lz
.tlz
.war
.zipx

Also, ffmpeg/avconv dependent formats:
.3gp
.avi
.flv
.mkv
.mov
.mp4
.mpeg
.mpg
.ogg
.ogv
.vob
.wmv
Tries to extract audio & video streams.
Video stream ends up inside the same type of container as the source, audio stream is being extracted in a bit more intelligent way.
Although tested and seems to work quite nice in latest Slacko & Precise (with most of videos I tried), the above is highly experimental.

- added exploderpm & rpm2cpio as possible tools for extracting .rpm (in case if 7z is not present)
I completely forgot about 'exploderpm' tool - it's OOTB in Slacko (and probably others).
@Sc0ttman: so, extracting .rpm will work now in Akita!

- added warning message and prompt if '.run' or '.shar' archive is about to be launched (timeout=10sec & defaults to "no").

PS. Don570 gave me an interesting idea to selectively add entries to right-click menu, depending on which of needed tools are installed in target Puppy.
However, I'll leave it for now, since there's too many exceptions and some of formats/extensions can be handled by more than one tool (like .rpm above), so I have no clear vision how to nicely implement this.
But the idea itself is neat...maybe later/elsewhere.

First post updated!

Greetings!

FatDog/Lighthouse UExtract Instructions

Posted: Wed 21 Aug 2013, 12:50
by SFR
Note for FatDog users:

UExtract seems to work pretty well on this Pup, just before installing, make sure to create one symlink:

Code: Select all

ln -s /etc/xdg/rox.sourceforge.net/SendTo /root/.config/rox.sourceforge.net/OpenWith
and then install UExtract.
Right-click entries will appear, next to the existing ones.

BTW, there are only 2 unsatisfied dependencies: 7z and exploderpm.
It's enough to install just the first one (it's p7zip in "Contributed packages" repo).
Also, install full version of cpio from "Extra packages" repo.

Tested with Fatdog64-621.iso running in live mode.
____________

Note for LightHouse users:

On this Puppy in turn, almost everything works OOTB, just like in Slacko.
It has a bit older, but full 7z.
The only "missing" dependency is unlzop, but it's easy to fix:

Code: Select all

ln -s /bin/busybox /usr/bin/unlzop
and we have it!

Tested with LightHouse64-6.01-B.iso running in live mode.

--------------------------
EDIT: New dependency, introduced in v1.7, is missing in both FatDog & LightHouse: gifsicle.
Couldn't find it in the repo, but here's the source: http://www.lcdf.org/gifsicle/

Greetings!

Posted: Wed 21 Aug 2013, 14:59
by mikeb
good work.

couple of notes...
I find with 7z sfs 3 and 4 are handled but symlinks do not extract correctly..you get a text file containing the path...not sure if that still applies but it is very handy to grab a file even on windows. I considered a workaround but as you mention unsquahfs is probably a better solution.

I built a custom 7za as a static as I found 7z could not find its own shared library under xarchive.... wondered if you had any problems. The sources are quite modular/customizable so in my case I only included formats not covered by standard linux utilities. I also included rar into the static.

One bonus bunny was having a standard format for use in xarchive so one wrapper could handle many formats. we all love 7zip :)

thats it
have fun

Mike

Posted: Wed 21 Aug 2013, 15:04
by sc0ttman
UExtract is fantastic...

Just a quick question, if I keep the static 7z bin i got in akita, will uextract still use exploderpm/rpm2cpio or would i need to remove 7z for that to workl??

Also, techno made a start at at GUI for tar or something... How is uextract at listing archive contents before unpacking/mounting them?? .. If it can list contents of most filetypes too, then it might be a good project for a gtkdialog frontend..

Posted: Wed 21 Aug 2013, 16:29
by SFR
mikeb wrote:I find with 7z sfs 3 and 4 are handled but symlinks do not extract correctly..you get a text file containing the path...not sure if that still applies but it is very handy to grab a file even on windows. I considered a workaround but as you mention unsquahfs is probably a better solution.
Yeah, if only 7z could handle symlinks and permissions better, most of other tools could go away!
mikeb wrote:I built a custom 7za as a static as I found 7z could not find its own shared library under xarchive.... wondered if you had any problems. The sources are quite modular/customizable so in my case I only included formats not covered by standard linux utilities. I also included rar into the static.
The full 7z included in Slacko works ok for me, can create/extract under xarchive (I just had to symlink 7z to 7za, as xarchive has only a wrapper for 7za).
mikeb wrote:One bonus bunny was having a standard format for use in xarchive so one wrapper could handle many formats. we all love 7zip :)
Yes, we do! :)
sc0ttman wrote:Also, techno made a start at at GUI for tar or something... How is uextract at listing archive contents before unpacking/mounting them?? .. If it can list contents of most filetypes too, then it might be a good project for a gtkdialog frontend..
Would be nice indeed, however I just checked and most of tools displays the contents of archives in a specifically formatted, unique way, so it'd be a nighmare to try to unify it. :lol:
sc0ttman wrote:Just a quick question, if I keep the static 7z bin i got in akita, will uextract still use exploderpm/rpm2cpio or would i need to remove 7z for that to workl??
Sure, you can keep it. :)
The sequence of use is 'exploderpm > 7z > rpm2cpio'.

Thanks guys &
Greetings!

Posted: Wed 21 Aug 2013, 18:02
by amigo
exploderpm is a tool I put together -combining altered code from two other tools -it will also extract *.deb archives. It works for rpm's without using rpm2cpio -rpm2cpio fails for certain types of rpm's. It works for *.deb archives without using ar.

Posted: Wed 21 Aug 2013, 19:37
by SFR
Hey Amigo

Thanks for the tip! Will be default also for .deb (dpkg-deb as a fallback) in the next version.

Greetings!

Posted: Wed 21 Aug 2013, 20:12
by don570
I put UEtract 1.1 in my rightclick menu utility

http://murga-linux.com/puppy/viewtopic. ... 872#720872

I'll try to keep it up-to-date in future.
______________________________________

Posted: Thu 22 Aug 2013, 15:15
by SFR
Update, version 1.3

- exploderpm is now default tool for extracting .deb (dpkg-deb as a fallback)
- now can extract multiple audio/video streams from video files
- command line option '-l|--list' has been changed to '-f|--formats'
- added '-l|--list' option that lists contents of an archive, instead of extracting

@Sc0ttman: I implemented this, but like I said - the output varies very much!
Besides I'm not sure if UExtract will be useful as a backend for a GUI, since it's designed for "mass extraction", so it's "all or nothing" - won't unpack specific files from within an archive.
Anyway, feel free to tinker with the code.

BTW, I just noticed that exploderpm fails with some of .rpm pkgs, for example this one.
What's interesting, rpm2cpio can handle those, so I changed the order again to 'rpm2cpio > exploderpm > 7z'.
But this time they're in a chain - if first tool fails, next one is used, and so on.

First post updated!

Greetings!