|
@@ -31,6 +31,8 @@ if __name__ == '__main__':
|
|
|
description = "Patches various strings out of the given binary")
|
|
|
|
|
|
parser.add_argument('binary', help = "Binary file to patch", type = argparse.FileType(mode = 'rb+'))
|
|
|
+ parser.add_argument('-c', '--config', help = "List of files / strings to match",
|
|
|
+ action = 'append')
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
@@ -40,7 +42,7 @@ if __name__ == '__main__':
|
|
|
# return multiline value as an evaluated Python literal
|
|
|
'pyliteral': ast.literal_eval,
|
|
|
}, interpolation = None)
|
|
|
- config.read("str0.ini", encoding = "utf8")
|
|
|
+ config.read([ "str0.ini" ] + args.config, encoding = "utf8")
|
|
|
|
|
|
for target in config.getpyliteral(os.path.basename(args.binary.name), "strings"):
|
|
|
if not patch_to_null(mbin, target):
|