lib/objc-obfuscator/obfuscator.rb in objc-obfuscator-0.2.0 vs lib/objc-obfuscator/obfuscator.rb in objc-obfuscator-0.2.1
- old
+ new
@@ -27,10 +27,10 @@
say_status :warning, "Found an occurrence of #{keyword} but there's no obj-string there: \"#{line}\""
else
say_status :info, "Found occurrence of __obfuscated string: '#{unencrypted_string}'."
encrypted_string = encryptor.encrypt unencrypted_string
line.slice! keyword # remove keyword
- line = line.gsub(unencrypted_string, encrypted_string) # replace the unencrypted with the encrypted
+ line = line.gsub("@\"#{unencrypted_string}\"", "[@\"#{encrypted_string}\" unobfuscatedString]") # replace the unencrypted with the encrypted
file_changed = true
end
end
dest_file.puts line
end