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!")
目录
相关文章
|
1月前
|
Shell 测试技术 索引
test工具的使用,你知道多少?
本文介绍了shell命令测试工具test的基本使用方法,包括文件存在性、属性检查、文件比较、数值和字符串比较及多条件判定等常见应用场景,并提供了具体示例和参数说明。
41 0
|
8月前
|
网络安全 PHP 数据安全/隐私保护
[网络安全/CTF] 记一次PHP序列化反序列化解题详析
[网络安全/CTF] 记一次PHP序列化反序列化解题详析
114 5
|
存储 SQL 缓存
|
编解码 Android开发
关于Android获取屏幕宽高、dp、sp、px之间的转化
开发过程中,动态创建布局,或者自定义view,少不了需要获取屏幕宽高,这里的宽高指手机屏幕的分辨率,单位是px,而我们在布局文件中用到的空间宽高单位是dp,字体用的是sp。 这几个计量单位之间,是有关联的,比如dp与px,是通过density来相互转化的,px跟sp则通过scaledDensity来相互转化,类似于小学的除数、被除数、商,三者之间的关系。
534 0
just test
click me
1031 0
test1
1340009911118900001111
349 0
|
Shell 开发工具 Perl

热门文章

最新文章