Skip to content

ppkill00/meat_ball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THE MEATBALL for line ctf lib


Meatball is a small library that manages files. You can check the fast-managed data here. It supports simple AES encryption. There are small vulnerabilities that may occur when managing files.


from me7_ba11.meatball import MeatBall

## Create meatball and create data
# append data
mb = MeatBall('meat.ball',)
data = {data:'meatball'}
key = mb.append(data)
print(key)
data = mb.get({"key":"uuid key"})
print(data)
{'uuid key':'meatball'}

# update data
data = {'key':'uuid key', 'data': 'meatball_change'}
mb.update(data)
data = mb.get({"key":"uuid key"})
print(data)
{'uuid key':'meatball_change'}

## File upload and update
# upload
with open('file','rb') as f:
    _file = f.read()

data = {data:'meatball'} <- Parameters are not used when uploading files.
key = mb.append(data, _file)
print(key)
data = mb.get({"key":"uuid key"})
print(data)
{'uuid key':'encoded file binary'}

# update to file
data = {'key':'uuid key', 'data': 'meatball'} <- Parameters are not used when uploading files.
mb.update(data, _file)
data = mb.get({"key":"uuid key"})
print(data)
{'uuid key':'encoded file binary'}

## Encryption
# append data with encryption
mb = MeatBall('meat.ball',)
data = {data:'meatball', enc='on'}
key = mb.append(data)
print(key)
data = mb.get({"key":"uuid key"})
print(data)
{'uuid key':'meatball'}

# update data with encrtyption
data = {'key':'uuid key', enc='on', 'data': 'meatball_change'}
mb.update(data)
data = mb.get({"key":"uuid key"})
print(data)
{'uuid key':'meatball_change'}

About

Small data management lib for LINE CTF 2022

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages