沙盒 IronPython? [英] Sandbox IronPython?

查看:57
本文介绍了沙盒 IronPython?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在我的 .Net 应用程序中运行 IronPython 解释器,但在沙箱中运行?我想拒绝 IP 脚本访问文件系统,同时仍允许应用程序本身访问.

Is it possible to run an IronPython interpreter inside my .Net application, but inside a sandbox? I want to deny the IP script access to the filesystem while still allowing the app itself access.

这是否涉及在第二个 AppDomain 中运行脚本引擎?我要怎么给它戴上手铐,让它不能为所欲为?

Would this involve running the scripting engine in a second AppDomain? How would I handcuff it so it can't do whatever it pleases?

推荐答案

这里有一篇文章解释了如何创建一个 AppDomain 并在沙箱中执行代码.只需创建 AppDomain 并限制在其中运行的代码即可.

Here's an article explaining how to create an AppDomain and execute code in a sandbox. Just create the AppDomain and handcuff the code that runs inside it.

这篇关于沙盒 IronPython?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆