Skip to content

Instantly share code, notes, and snippets.

@Anachron
Last active August 29, 2015 14:12
Show Gist options
  • Select an option

  • Save Anachron/983c9e7db5a32ac98a04 to your computer and use it in GitHub Desktop.

Select an option

Save Anachron/983c9e7db5a32ac98a04 to your computer and use it in GitHub Desktop.
➜ Downloads head -n 20 HoNClient-3.6.0.sh
#!/bin/sh
X86_START=455
X86_SIZE=156244
X86_64_START=156699
X86_64_SIZE=199096
if [ "$(echo $0 | awk '{ string=substr($1, 1, 1); print string; }' )" = "/" ]; then
BINARY="$0-bin"
else
BINARY="./$0-bin"
fi
if [ $(uname -m) = "x86_64" ]; then
dd if="$0" of="$BINARY" ibs=1 count=$X86_64_SIZE skip=$X86_64_START
else
dd if="$0" of="$BINARY" ibs=1 count=$X86_SIZE skip=$X86_START
fi
chmod +x "$BINARY"
"$BINARY" --base="$0" $*
rm "$BINARY"
exit 0
ELF��4^4(44�4�44�4����N�NP���P����HH�H� P�tdHNH�H�$$Q�td/lib/ld-linux.so.2GNU���r,&]X+^wh�L6;����DnljJ<*�.�|B��N_F�/�3�d���S!~�o U`i��Te$pqAbm7OxV��M� kI
02@@�@8@@@@@@��@@@@���� (invalid encoding)
@Anachron

Copy link
Copy Markdown
Author

➜ Downloads ./HoNClient-3.6.0.sh
199096+0 records in
388+1 records out
199096 bytes (199 kB) copied, 0,0838814 s, 2,4 MB/s
././HoNClient-3.6.0.sh-bin: 1: ././HoNClient-3.6.0.sh-bin: en4�Vxq7��: not found
././HoNClient-3.6.0.sh-bin: 2: ././HoNClient-3.6.0.sh-bin: Syntax error: ")" unexpected
././HoNClient-3.6.0.sh-bin: 1: ././HoNClient-3.6.0.sh-bin: ELF����: not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment