gpt4 book ai didi

python - 使用 pysandbox 限制功能 (RF)

转载 作者:行者123 更新时间:2023-12-01 04:47:22 25 4
gpt4 key购买 nike

我的问题与 here 完全相同和 here .

我还使用 simple2.py 对该程序生成的可执行文件进行沙箱处理 test1.c:

 #include<stdio.h>
int main(){
puts("Hello World");
return 0;
}

我使用以下命令来构建可执行文件:

gcc -static test1.c

在此之后,如果我这样做:

ldd a.out

我得到输出:

not a dynamic executable

但是,我运行sample2.py时的结果仍然是

result: RF
cpu: 0ms
mem: 952kB

我究竟做错了什么?

最佳答案

我改变这个:

x86_64=set([0,1,5,8,9,10,11,12,16,25,63,158,219,231])

为此:

x86_64=set([0,1,5,8,9,10,11,12,16,21,25,63,89,158,219,231])

在sample2.py中,它可以工作。

关于python - 使用 pysandbox 限制功能 (RF),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29143272/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com