test114514

简介: test114514
import code, os, subprocess
import pty
def blacklist_fun_callback(*args):
    print("Player! It's already banned!")
pty.spawn = blacklist_fun_callback
os.system = blacklist_fun_callback
os.popen = blacklist_fun_callback
subprocess.Popen = blacklist_fun_callback
subprocess.call = blacklist_fun_callback
code.interact = blacklist_fun_callback
code.compile_command = blacklist_fun_callback
vars = blacklist_fun_callback
attr = blacklist_fun_callback
dir = blacklist_fun_callback
getattr = blacklist_fun_callback
exec = blacklist_fun_callback
__import__ = blacklist_fun_callback
compile = blacklist_fun_callback
breakpoint = blacklist_fun_callback
del os, subprocess, code, pty, blacklist_fun_callback
input_code = input("Can u input your code to escape > ")
blacklist_words = [
    "subprocess",
    "os",
    "code",
    "interact",
    "pty",
    "pdb",
    "platform",
    "importlib",
    "timeit",
    "imp",
    "commands",
    "popen",
    "load_module",
    "spawn",
    "system",
    "/bin/sh",
    "/bin/bash",
    "flag",
    "eval",
    "exec",
    "compile",
    "input",
    "vars",
    "attr",
    "dir",
    "getattr"
    "__import__",
    "__builtins__",
    "__getattribute__",
    "__class__",
    "__base__",
    "__subclasses__",
    "__getitem__",
    "__self__",
    "__globals__",
    "__init__",
    "__name__",
    "__dict__",
    "._module",
    "builtins",
    "breakpoint",
    "import",
]
def my_filter(input_code):
    for x in blacklist_words:
        if x in input_code:
            return False
    return True
while '{' in input_code and '}' in input_code and input_code.isascii() and my_filter(input_code) and "eval" not in input_code and len(input_code) < 65:
    input_code = eval(f"f'{input_code}'")
else:
    print("Player! Please obey the filter rules which I set!")
目录
相关文章
|
6月前
|
消息中间件 运维 Serverless
使用函数计算,数禾如何实现高效的数据处理?
通过基于函数计算异步调用放宽消息体大小,可以以最少的触发器资源,达到函数计算的大并发处理。通过 NAS/OSS 原生支持文件锁的能力,可以减少文件的数量,同时也减少业务层代码在这方面的处理复杂度。
102363 0
|
存储 SQL 缓存
|
编解码 Android开发
关于Android获取屏幕宽高、dp、sp、px之间的转化
开发过程中,动态创建布局,或者自定义view,少不了需要获取屏幕宽高,这里的宽高指手机屏幕的分辨率,单位是px,而我们在布局文件中用到的空间宽高单位是dp,字体用的是sp。 这几个计量单位之间,是有关联的,比如dp与px,是通过density来相互转化的,px跟sp则通过scaledDensity来相互转化,类似于小学的除数、被除数、商,三者之间的关系。
499 0
just test
click me
1017 0
test1
1340009911118900001111
338 0
|
Shell 开发工具 Perl
|
开发工具