# repair executables created by xcode # this executables include a static path e.g. $filename=$ARGV[0]; $from=$ARGV[1]; $to=$ARGV[2]; undef $/; if (length($to)>length($from)) { print STDERR "not enough space in binary, binary patch already applied ?\n"; exit(0); } for ($i=0;i; $content=~s/$from/$to/; seek(EXE, 0, 0); print EXE $content or die "can not write content"; close(EXE);