<reponame>shownadda/Malware-Dev
## Appends the text "TEST to an image"

with open ("pizza.jpg", "ab") as f:
    f.write(b"TEST")


with open("pizza.jpg", "rb") as f:
    content = f.read()
    offset = content.index(bytes.fromhex("FFD9"))
    f.seek(offset + 2)
    print(f.read())

## Appends the text "TEST to an image"

with open ("pizza.jpg", "ab") as f:
    f.write(b"TEST")


with open("pizza.jpg", "rb") as f:
    content = f.read()
    offset = content.index(bytes.fromhex("FFD9"))
    f.seek(offset + 2)
    print(f.read())
## Appends the text "TEST to an image"