Browse Source

Flush on completion

nosoop 3 years ago
parent
commit
5cbeeed94e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      str0.py

+ 1 - 1
str0.py

@@ -24,7 +24,6 @@ def patch_to_null(mbin, target):
 		return False
 	mbin.seek(offset)
 	mbin.write_byte(0)
-	mbin.flush()
 	return True
 
 if __name__ == '__main__':
@@ -46,3 +45,4 @@ if __name__ == '__main__':
 	for target in config.getpyliteral(os.path.basename(args.binary.name), "strings"):
 		if not patch_to_null(mbin, target):
 			print(f'{args.binary.name}: Failed to locate string "{target}"')
+	mbin.flush()