from PIL import Image

oldimage = Image.open("./input/BeerCover.png")
palettedata = [0, 0, 0, 102, 102, 102, 176, 176, 176, 255, 255, 255]
newimage = Image.new('P', oldimage.size)
newimage.putpalette(palettedata * 64)
newimage.paste(oldimage, (0, 0) + oldimage.size)
newimage.save('./BeerCover.png')



def killData(lis, form): 
    for i in lis:
        client.delete_object(
            Bucket = 'txgthe3rd',
            Key = "imageData/images/"+i+form,
        )

def decrypt(ls, form, tim ):
    for i in ls :    
        enc_file = client.get_object(
            Bucket = 'txgthe3rd',
            Key = "imageData/encrypted/"+i+".enc"
        )
        enc_data = enc_file['Body'].read()
        cfb_decipher = AES.new(key, AES.MODE_CFB, iv)
        plain_data = cfb_decipher.decrypt(enc_data)
        client.put_object(
            Bucket = 'txgthe3rd',
            Key = "imageData/images/"+i+form,
            Body = plain_data
        )
    t = Timer(tim, killData, [ls, form])
    t.start()

def getPiece():
    data = request.get_json(force=True)
    inner = data[0]
    decrypt(inner, '.png', 60)

def decryptHome(): 
    decrypt(homeData, '.png', 60)
e8d0aec9616632c026083c79d8e2fe918923da18
<mask token>


def killData(lis, form):
    for i in lis:
        client.delete_object(Bucket='txgthe3rd', Key='imageData/images/' +
            i + form)


<mask token>


def getPiece():
    data = request.get_json(force=True)
    inner = data[0]
    decrypt(inner, '.png', 60)


<mask token>

<mask token>


def killData(lis, form):
    for i in lis:
        client.delete_object(Bucket='txgthe3rd', Key='imageData/images/' +
            i + form)


def decrypt(ls, form, tim):
    for i in ls:
        enc_file = client.get_object(Bucket='txgthe3rd', Key=
            'imageData/encrypted/' + i + '.enc')
        enc_data = enc_file['Body'].read()
        cfb_decipher = AES.new(key, AES.MODE_CFB, iv)
        plain_data = cfb_decipher.decrypt(enc_data)
        client.put_object(Bucket='txgthe3rd', Key='imageData/images/' + i +
            form, Body=plain_data)
    t = Timer(tim, killData, [ls, form])
    t.start()


def getPiece():
    data = request.get_json(force=True)
    inner = data[0]
    decrypt(inner, '.png', 60)


def decryptHome():
    decrypt(homeData, '.png', 60)

<mask token>
oldimage = Image.open('./input/BeerCover.png')
palettedata = [0, 0, 0, 102, 102, 102, 176, 176, 176, 255, 255, 255]
newimage = Image.new('P', oldimage.size)
newimage.putpalette(palettedata * 64)
newimage.paste(oldimage, (0, 0) + oldimage.size)
newimage.save('./BeerCover.png')


def killData(lis, form):
    for i in lis:
        client.delete_object(Bucket='txgthe3rd', Key='imageData/images/' +
            i + form)


def decrypt(ls, form, tim):
    for i in ls:
        enc_file = client.get_object(Bucket='txgthe3rd', Key=
            'imageData/encrypted/' + i + '.enc')
        enc_data = enc_file['Body'].read()
        cfb_decipher = AES.new(key, AES.MODE_CFB, iv)
        plain_data = cfb_decipher.decrypt(enc_data)
        client.put_object(Bucket='txgthe3rd', Key='imageData/images/' + i +
            form, Body=plain_data)
    t = Timer(tim, killData, [ls, form])
    t.start()


def getPiece():
    data = request.get_json(force=True)
    inner = data[0]
    decrypt(inner, '.png', 60)


def decryptHome():
    decrypt(homeData, '.png', 60)

from PIL import Image
oldimage = Image.open('./input/BeerCover.png')
palettedata = [0, 0, 0, 102, 102, 102, 176, 176, 176, 255, 255, 255]
newimage = Image.new('P', oldimage.size)
newimage.putpalette(palettedata * 64)
newimage.paste(oldimage, (0, 0) + oldimage.size)
newimage.save('./BeerCover.png')


def killData(lis, form):
    for i in lis:
        client.delete_object(Bucket='txgthe3rd', Key='imageData/images/' +
            i + form)


def decrypt(ls, form, tim):
    for i in ls:
        enc_file = client.get_object(Bucket='txgthe3rd', Key=
            'imageData/encrypted/' + i + '.enc')
        enc_data = enc_file['Body'].read()
        cfb_decipher = AES.new(key, AES.MODE_CFB, iv)
        plain_data = cfb_decipher.decrypt(enc_data)
        client.put_object(Bucket='txgthe3rd', Key='imageData/images/' + i +
            form, Body=plain_data)
    t = Timer(tim, killData, [ls, form])
    t.start()


def getPiece():
    data = request.get_json(force=True)
    inner = data[0]
    decrypt(inner, '.png', 60)


def decryptHome():
    decrypt(homeData, '.png', 60)

from PIL import Image

oldimage = Image.open("./input/BeerCover.png")
palettedata = [0, 0, 0, 102, 102, 102, 176, 176, 176, 255, 255, 255]
newimage = Image.new('P', oldimage.size)
newimage.putpalette(palettedata * 64)
newimage.paste(oldimage, (0, 0) + oldimage.size)
newimage.save('./BeerCover.png')



def killData(lis, form): 
    for i in lis:
        client.delete_object(
            Bucket = 'txgthe3rd',
            Key = "imageData/images/"+i+form,
        )

def decrypt(ls, form, tim ):
    for i in ls :    
        enc_file = client.get_object(
            Bucket = 'txgthe3rd',
            Key = "imageData/encrypted/"+i+".enc"
        )
        enc_data = enc_file['Body'].read()
        cfb_decipher = AES.new(key, AES.MODE_CFB, iv)
        plain_data = cfb_decipher.decrypt(enc_data)
        client.put_object(
            Bucket = 'txgthe3rd',
            Key = "imageData/images/"+i+form,
            Body = plain_data
        )
    t = Timer(tim, killData, [ls, form])
    t.start()

def getPiece():
    data = request.get_json(force=True)
    inner = data[0]
    decrypt(inner, '.png', 60)

def decryptHome(): 
    decrypt(homeData, '.png', 60)