gpt4 book ai didi

python - false 未定义

转载 作者:太空宇宙 更新时间:2023-11-03 12:17:23 24 4
gpt4 key购买 nike

<分区>

我正在关注“https://www.mandiant.com/blog/parsing-registry-hives-python/”。

在运行以下代码时:

f = open("SAMPLE1.DAT")
buf = f.read()
regf = RegistryParse.REGFBlock(buf, 0, false)

for HBIN in regf.hbins():
for cell in HBIN.cells():
if cell.is_free():
print "Unallocated cell at offset 0x%x" % (cell.offset())

我得到一个错误:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'false' is not defined

可能是什么原因?

现在,它变成了:

Traceback (most recent call last):
File "mig.py", line 11, in <module>
regf = RegistryParse.REGFBlock(buf, 0, False)
File "/usr/local/lib/python2.7/dist-packages/Registry/RegistryParse.py", line 236, in __init__
raise ParseException("Invalid REGF ID")
Registry.RegistryParse.ParseException: Registry Parse Exception(Invalid REGF ID)

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com