Added deletion to custom attributes

This follows from enabling tag deletion, however does require some
consideration with the APIs.

Now we can remove custom attributes, as well as determine if an attribute
exists or not.
This commit is contained in:
Christopher Haster
2018-09-09 18:48:18 -05:00
parent c67a41af7a
commit 617dd87621
5 changed files with 63 additions and 22 deletions

View File

@@ -19,10 +19,11 @@ def corrupt(block):
break
tag ^= ntag
file.seek(tag & 0xfff, os.SEEK_CUR)
size = (tag & 0xfff) if (tag & 0xfff) != 0xfff else 0
file.seek(size, os.SEEK_CUR)
# lob off last 3 bytes
file.seek(-((tag & 0xfff) + 3), os.SEEK_CUR)
file.seek(-(size + 3), os.SEEK_CUR)
file.truncate()
def main(args):