Created
November 9, 2015 05:05
-
-
Save randomize/bf094cd98e67e2333bc4 to your computer and use it in GitHub Desktop.
Perl script to remove Unity dev build notice.
This file contains hidden or 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
#!/usr/bin/perl | |
use strict; | |
my ($hex_in, $hex_out) = @ARGV; | |
print "[PATHCING] : $hex_in => $hex_out \n"; | |
open (HEX_IN, "$hex_in") or die("open failed for $hex_in : $!"); | |
open (HEX_OUT, ">$hex_out") or die("open failed for $hex_out : $!"); | |
binmode(HEX_IN); | |
binmode(HEX_OUT); | |
local $/; | |
my $hex_string = <HEX_IN>; | |
# | |
# Replacing : | |
# \x55\x6E\x69\x74\x79\x57\x61\x74\x65\x72\x6D\x61\x72\x6B\x2D\x64\x65\x76 = UnityWatermark-dev | |
# \x00\x00\x73 | |
# | |
# With | |
# \x55\x6E\x69\x74\x79\x57\x61\x74\x65\x72\x6D\x61\x72\x6B\x2D\x64\x65\x76 = UnityWatermark-dev | |
# \x00\x00\x00 | |
# | |
$hex_string =~ s/(\x55\x6E\x69\x74\x79\x57\x61\x74\x65\x72\x6D\x61\x72\x6B\x2D\x64\x65\x76\x00\x00)\x73/$1\x00/gi; | |
print HEX_OUT $hex_string; | |
close(HEX_IN); | |
close(HEX_OUT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment