Advertisement
Guest User

Untitled

a guest
Aug 15th, 2024
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Python script to create a ZipCard
  2. # Author: randomfella0
  3. # How to use:
  4. # save source to file called embed.py, put the character card and desired mod into the same folder,
  5. # call the character card card.png and mod mod.zipmod and run the script, ZipCard will be saved into zipcard.png
  6. # How does it work?:
  7. # 1. It is safe to write any sequence of bytes to the end of a character card.
  8. # 2. It is safe to write any sequence of bytes to the start of a zip(mod) file.
  9. # So we can safely write a zip(mod) to the end of a character card and the result will be both a valid zipmod and a valid character card.
  10.  
  11. # Read the files
  12. card = open("card.png", "rb").read()
  13. mod = open("mod.zipmod", "rb").read()
  14.  
  15. # Combine the files
  16. with open("zipcard.png", "wb") as f:
  17.     f.write(card)
  18.     f.write(mod)
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement