Skip to content

Instantly share code, notes, and snippets.

@msg555
Created April 16, 2015 20:10
Show Gist options
  • Save msg555/1bc4e83878c2ceebdab6 to your computer and use it in GitHub Desktop.
Save msg555/1bc4e83878c2ceebdab6 to your computer and use it in GitHub Desktop.
Dustforce Wrapper for Linux
#!/bin/sh
DIR="/home/msg555/Dustforce"
BIN="$DIR/Dustforce.bin.x86_64"
BINESC=$(echo "$BIN" | sed -e 's/[]\/$*.^|[]/\\&/g')
if ps aux | grep "$BINESC" > /dev/null; then
/bin/echo -en '\xe1\x0d\x00\x00'"$@"'\x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000' | head -c 256 > "$DIR/IPC.sock"
else
"$BIN" $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment