command
module
Version:
v0.0.0-...-f33ba26
Opens a new window with list of versions in this module.
Published: Jul 6, 2019
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
gopacker
A UPX-like packer to shrink executables.
Quick Start
go get github.com/nirhaas/gopacker
gopacker <executable_to_pack>
How does it work
Packing
- Copy
gopacker
executable itself to output file.
- Compress and stream (append) to output file.
- Append compressed size.
- Append magic string.
Output file is now a functional executable.
Unpacking
When running the packed executable:
- Checks the last few bytes to see if magic string is there.
- Reading compressed size.
- Reading compressed data.
- Uncompressing to memory.
- Overriding the packed executable.
- syscall exec to run the unpacked executable.
Possible TODO:
- Better compression.
- Encryption.
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.