-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial source code and update README
- Loading branch information
Showing
2 changed files
with
811 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,53 @@ | ||
# perc | ||
PE command line resource utility: list/add/delete/extract resources in Windows PE file | ||
Command line PE resource utility: | ||
Add, replace, delete, extract or list resources in Windows PE file | ||
|
||
`perc` uses Windows API to access, enumerate or modify resources in a PE file. | ||
|
||
Pre-built 32/64 Windows binaries are available at the | ||
[releases page](https://github.com/avih/perc/releases). | ||
|
||
### Examples | ||
|
||
List all resources in `example.dll`: | ||
```sh | ||
perc -L example.dll | ||
``` | ||
|
||
Add a manifest resource file `manifest.xml` as ID `1` with default | ||
(neutral) language to file `example.exe`: | ||
```sh | ||
perc -a manifest.xml -t MANIFEST -i 1 example.exe | ||
``` | ||
|
||
Extract the manifest with neutral language and ID `1` from `example.exe` to | ||
`manifest.xml`: | ||
```sh | ||
perc -x -t MANIFEST -i 1 example.exe > manifest.xml | ||
``` | ||
|
||
### Usage: | ||
``` | ||
Usage: perc.exe -h | -{D|L|R|a:|d|x} [-{t:i:l:}] [INDEX] PE | ||
Add, replace, delete, extract or list resources in Windows PE file. | ||
Actions - exactly one must be specified, possibly with -n: | ||
-h Print this help and exit. | ||
-n No-write: don't modify PE, don't write list or extracted resource. | ||
-D Delete all (*) resources in PE. | ||
-L List all (*) resources in PE as INDEX: TYPE/ID/LANG (SIZE). | ||
-R Same as -L, but TYPE is printed as raw integer, if possible. | ||
-d Delete the resource TYPE/ID/LANG in PE. | ||
-x Extract the resource TYPE/ID/LANG in PE to stdout (**). | ||
-a RSRC Add resource file RSRC (stdin if '-') as TYPE/ID/LANG to PE (**). | ||
(*) If any of TYPE, LANG, ID are given: only items with all given values. | ||
(**) Raw data directly from/to PE. E.g. ICON is without header, etc. | ||
Target - at most one TYPE, one ID, and one LANG (INDEX overrides others): | ||
-t TYPE Symbol/int/@STR resource type. E.g. -t ICON, -t 2, -t @"foo bar". | ||
-i ID Int/@STR resource ID/NAME. | ||
-l LANG Int resource language. Default for -a/-x/-d is 0 (neutral). | ||
INDEX Sets TYPE+ID+LANG of existing resource INDEX (from -L/-R output). | ||
perc v0.1 PE Resource utility https://github.com/avih/perc | ||
``` |
Oops, something went wrong.