Search code examples
pythonubuntugccsandboxpysandbox

Restricted Function (RF) with pysandbox


My problem is exactly same as here and here.

I am also using simple2.py for sandboxing the executable produced by this program test1.c:

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

I am using the following command to build the executable:

gcc -static test1.c

After this if I do:

ldd a.out

I am getting the output:

not a dynamic executable

However, The result when I run the sample2.py still is

result: RF
cpu: 0ms
mem: 952kB

What exactly am I doing wrong?


Solution

  • I change this:

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

    for this:

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

    in sample2.py, and It works.