瀏覽代碼

Reset seek before search

The other strings weren't being caught.
nosoop 4 年之前
父節點
當前提交
3e3f4b3b31
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      str0.py

+ 1 - 0
str0.py

@@ -18,6 +18,7 @@ import mmap
 import os
 
 def patch_to_null(mbin, target):
+	mbin.seek(0)
 	offset = mbin.find(target.encode('ascii'))
 	if offset == -1:
 		return False