Eh bien, le sujet dit tout. J'ai un exe qui est un SFX, et je veux extraire le ZIP du SFX. Comment puis-je le faire ?
Réponses
Trop de publicités?Sous Linux, il est possible d'utiliser l'utilitaire "zip" :
$ file london_f.exe
london_f.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit
Avertissement : La ligne suivante modifie le fichier .exe original pour en faire une archive zip pure sans les parties exe !
$ zip -J london_f.exe
$ file london_f.exe
london_f.exe: Zip archive data, at least v1.0 to extract
$ zip --version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon. Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.
...
Sous Linux, s'il s'agit d'une personne têtue et
zip -J file.exe
ne le transforme pas en un zip extractible parce que la partie non-zip n'est pas simplement ajoutée, voir la page de manuel :
-J
--junk-sfx
Strip any prepended data (e.g. a SFX stub) from the archive.
l'utilitaire zip dispose de deux autres options utiles :
-F
--fix
-FF
--fixfix
Fix the zip archive. The -F option can be used if some portions of the archive are missing, but requires a reasonably intact central directory. The
input archive is scanned as usual, but zip will ignore some problems. The resulting archive should be valid, but any inconsistent entries will be left
out.
When doubled as in -FF, the archive is scanned from the beginning and zip scans for special signatures to identify the limits between the archive mem
bers. The single -F is more reliable if the archive is not too much damaged, so try this option first.
If the archive is too damaged or the end has been truncated, you must use -FF. This is a change from zip 2.32, where the -F option is able to read a
truncated archive. The -F option now more reliably fixes archives with minor damage and the -FF option is needed to fix archives where -F might have
been sufficient before.
Neither option will recover archives that have been incorrectly transferred in ascii mode instead of binary. After the repair, the -t option of unzip
may show that some files have a bad CRC. Such files cannot be recovered; you can remove them from the archive using the -d option of zip.
Note that -FF may have trouble fixing archives that include an embedded zip archive that was stored (without compression) in the archive and, depending
on the damage, it may find the entries in the embedded archive rather than the archive itself. Try -F first as it does not have this problem.
The format of the fix commands have changed. For example, to fix the damaged archive foo.zip,
zip -F foo --out foofix
tries to read the entries normally, copying good entries to the new archive foofix.zip. If this doesn't work, as when the archive is truncated, or if
some entries you know are in the archive are missed, then try
zip -FF foo --out foofixfix
and compare the resulting archive to the archive created by -F. The -FF option may create an inconsistent archive. Depending on what is damaged, you
can then use the -F option to fix that archive.
A split archive with missing split files can be fixed using -F if you have the last split of the archive (the .zip file). If this file is missing, you
must use -FF to fix the archive, which will prompt you for the splits you have.
Currently the fix options can't recover entries that have a bad checksum or are otherwise damaged.
Essayez donc
zip -F file.exe --out extracted.zip
et en cas d'échec
zip -FF file.exe --out extracted.zip
Si vous avez affaire à des jeux gog.com, utilisez Innoextract . unzip
, unrar
7zip et d'autres n'ont pas fonctionné pour moi :
sudo apt install innoextract # Install (On Debian/Ubuntu)
innoextract setup_duke3d_2.0.0.85.exe # Extract
Je n'ai pas encore vu de programme de manipulation de zip qui ne puisse pas faire cela. Les archives auto-extractibles sont également des fichiers zip valides, mais elles contiennent un tas de choses supplémentaires (l'extracteur).
Vous constaterez probablement que vous ne pouvez pas sélectionner l'utilitaire comme moyen d'ouvrir le fichier, mais si vous exécutez simplement l'utilitaire et sélectionnez ensuite le fichier, cela fonctionne.
- Réponses précédentes
- Plus de réponses