Commit 1e8dd70a authored by blackle's avatar blackle
Browse files

Add NO_FILE_MANAGER_COMPAT to fix issue #1

parent cf98fc2e
......@@ -12,8 +12,8 @@ but even smaller. It doesn't have a 64-bit version, though.**
| mode etc. | vondehi | trident | Fishypack | sh-based unpacker |
|:------------ | -------:| -------:| ---------:| -----------------:|
| gzip, 32-bit | 159 | 172 | 179? (198?) | 48 to 72 |
| xz, 32-bit | 162 (166*) | 179 | 186 | 48 to 72 |
| gzip, 32-bit | 161 | 172 | 179? (198?) | 48 to 72 |
| xz, 32-bit | 164 (168*) | 179 | 186 | 48 to 72 |
| gzip, 64-bit | N/A | 208 | 208? | 48 to 72 |
| xz, 64-bit | N/A | 217 | 217 | 48 to 72 |
| Preserves args | Y | N | tries to | can, but often not |
......@@ -47,6 +47,7 @@ cat $out $intro_compressed > $final
* `NO_UBUNTU_COMPAT` (default off): assume `/bin` is the same as `/usr/bin`.
Originally named like this because on my machine, `/bin` is linked t
`/usr/bin`, but on the Revision compomachine (which runs Ubuntu), it isn't.
* `NO_FILE_MANAGER_COMPAT` (default off): save two bytes by putting instructions in the EI_CLASS and EI_DATA fields of the ELF header. Causes executables packed with vondehi to not be recognized as executable in file managers.
* `USE_VFORK` (default off): use `vfork(2)` instead of `fork(2)`. I hope you
know what you're doing when you enable this.
* `TAG` (default empty): add a vanity tag right before the compressed data.
......
......@@ -29,8 +29,14 @@ org 0xEBDB0000
ehdr: ;~e_ident
; jg short 0x47 (inc ebp) ; dec esp ; inc esi
db 0x7F,"ELF" ;!E_MAGIC
%ifndef NO_FILE_MANAGER_COMPAT
db 0x01 ;E_CLASS
db 0x01 ;E_DATA
%endif
_parent.0:
%ifdef NO_FILE_MANAGER_COMPAT
xor ebx, ebx
%endif
xchg eax, edi ;edi is zero now and will be overwritten eventually
mov al, SYS_waitpid
int 0x80
......@@ -111,6 +117,9 @@ phdr.end equ phdr.endm1 + 1
_start.4:
int 0x80
%ifndef NO_FILE_MANAGER_COMPAT
xor ebx, ebx
%endif
test eax, eax
jnz short _parent.0
;jz short _child
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment