Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

4636312

Cancelled
Original poster
Feb 13, 2016
1
0
Hey guys,

I am complete newbie. I ran the patch below in the utilities' terminal window. When it completed it didn't work and now blocks me registering my software. I've already closed the terminal and DID NOT back up a previous OSX version on time machine. Please can someone explain how I can undo this patch? Thanks!

Here is the patch:
Code:
#!/bin/bash

function msg {
   printf "\e[1;32m>\e[m %s\n" "$1"
}
function msg2 {
   printf "\e[1;34m>\e[m %s\n" "$1"
}

msg "Patch!"

msg2 "Wait!...Patching!..."

sudo perl -pi -e 's|\x75\x11\x48\x8D\x7D\xD8\xE8|\x90\x90\x48\x8D\x7D\xD8\xE8|g' ...

; (details of perl commands removed by the forum administrators for reasons of privacy)

msg "Completed!"

osascript <<EOT
tell application "Finder"
activate
display alert "Have FUN!..."
end tell
EOT
 
Last edited by a moderator:
In your script, the substitution operator is used to search and replace a matching pattern with a different pattern, for example:
Code:
s|foo|bar|g  # the g (global) modifier will replace all matches of foo with bar

So in the event you have no backup to restore from (boo), just swap the search and replace patterns in each of the substitution statements.
 
In your script, the substitution operator is used to search and replace a matching pattern with a different pattern, for example:
Code:
s|foo|bar|g  # the g (global) modifier will replace all matches of foo with bar

So in the event you have no backup to restore from (boo), just swap the search and replace patterns in each of the substitution statements.

Dangerous, although that probably doesn't matter if you're hosed without a backup. But if every 'foo' is replaced with 'bar', replacing every 'bar' with foo may not work because there may have been additional 'bar' that had been there already (i.e. not as a result of the swap).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.