Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phith0n/PaddingZip
PaddingZip is a tool that you can craft a zip file that contains the padding characters between the file content.
https://github.com/phith0n/PaddingZip
Last synced: 21 days ago
JSON representation
PaddingZip is a tool that you can craft a zip file that contains the padding characters between the file content.
- Host: GitHub
- URL: https://github.com/phith0n/PaddingZip
- Owner: phith0n
- License: mit
- Created: 2022-01-27T15:16:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-14T18:38:48.000Z (over 2 years ago)
- Last Synced: 2024-11-19T22:50:59.722Z (22 days ago)
- Language: Python
- Size: 182 KB
- Stars: 62
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hacking-lists - phith0n/PaddingZip - PaddingZip is a tool that you can craft a zip file that contains the padding characters between the file content. (Python)
README
# PaddingZip
PaddingZip is a tool that you can craft a zip file that contains the padding characters between the file content.
A normal zip file:
![](2.png)
A craft but valid zip file:
![](3.png)
For example, you can craft a valid JAR file using PaddingZip:
![](1.png)
## Usage
```shell
$ python paddingzip.py -h
usage: paddingzip.py [-h] -i INPUT_FILENAME -o OUTPUT_FILENAME [-p PREPEND] [-a APPEND]A tool that you can craft a zip file that contains the padding characters between the file content
optional arguments:
-h, --help show this help message and exit
-i INPUT_FILENAME, --input INPUT_FILENAME
-o OUTPUT_FILENAME, --output OUTPUT_FILENAME
-p PREPEND, --prepend PREPEND
the characters that you want to prepend to the file beginning
-a APPEND, --append APPEND
the characters that you want to append to the file```
For example:
```shell
python paddingzip.py -i original.jar -o modify.jar --prepend "this prepend to the start" --append "this append to the end"
```## `zip -F`
You also can use `zip -F` to fix the offset:
```shell
$ echo -n "prepend" > f
$ cat f a.zip > b.zip
$ zip -F b.zip --out c.zip
```## License
MIT License