tav/scripts

safelite: ctypes can still be used

Closed this issue · 1 comments

Hi,

I noticed that the ctypes module is still available, and can be used to break safelite:

>>> import safelite
>>> ctypes = safelite.sys.modules['ctypes']
>>> libc = ctypes.CDLL('libc.so.6')
>>> file = libc.fopen('foo.txt', 'w')
>>> libc.fprintf(file, 'Hi')  
2
>>> libc.fclose(file)  
0

Regards

tav commented

That's to be expected. The original challenge was to break it after running just from safelite import FileReader...