Skip to content

IAmTalas/re-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

re-extractor

Usages

A simple script that extracts various types of compressions.

Supported compressions : KGB, ARJ, PPMD, ZIP, RZIP, GZIP, BZIP2, TAR, CAB, ARC, XZ, 7z, ZOO, RAR s

Usage: ./extract.sh <filename> [-d|--directory <arg>] [-e|--exclude <arg>] [-h|--help] 
        <filename>: Compressed filename
        -d, --directory: Specify output directory (default: '_extracted')
        -e, --exclude: Exclude <FILE EXTENSION> from decompressing (empty by default)
        -h, --help: Prints help

Pre-requirements

$ sudo apt-get install ppmd kgb arj rzip bzip2 cabextract nomarch zoo

Note: You may need to install ppmd and zoo packages manually.


use cases

As use cases, we can refer to

Tootsie Pop (H@cktivityCon CTF 2020):

Simply give the filename and output directory name.

$ ./extract.sh pop.zip -d output-dir/
$ ls output-dir/
filler.txt  flag.png

Like 1000 (picoCTF 2019):

Exclude option is for ignoring side files in extraction and preventing errors in decompressing them.

$ ./extract.sh 1000.tar -d output-dir/ -e txt
$ ls output-dir/
8c4be4.gz
$ file 8c4be4.gz
8c4be4.gz: ASCII text

Releases

No releases published

Packages

No packages published

Languages