浏览代码

Flush on completion

nosoop 3 年之前
父节点
当前提交
5cbeeed94e
共有 1 个文件被更改,包括 1 次插入1 次删除
  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()