Explorar o código

Flush on completion

nosoop %!s(int64=3) %!d(string=hai) anos
pai
achega
5cbeeed94e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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()