Translator search script

I am looking for a .NET library that performs a specific task.

Say a program was sent to my application (in some script language), and I want my application to run this script. That the script may come from an openly hostile person, but I still want to run it. (Like JavaScript in a browser.)

var sc = new SecureScript("SomeFileFromAnUnknownPossiblyHostileSource.xyz");
/* Set some event handlers. */
sc.Run();

During the “Run” call, the script can create its own data, randomly work with simple data types, do what it wants, since the effects are contained inside it in its own world.

If the script tries to open OpenFile ("C: /WINDOWS/SOMETHING.EXE"), this will not work because I did not register the OpenFile function. The only way the script interacts with the outside world is to use a function that I specifically registered to use the script. By doing this, I take responsibility for the fact that the script cannot do anything wrong with it. Of course, I could neglect checking the parameters, but this is not the work of the interpreter.

If a script allocates too much memory or takes too many processor cycles, the interpreter class will call my event handler after the threshold is accepted, and will give me the opportunity to stop the script dead.

, , . Javascript JIT- , , - .

, . , , . .NET/Mono, .

.

+3
1

, script.

.NET, : AppDomain.

, , ( ). AppDomain Managed AddIn framework, AddInProccess (. : , ).

+2

Source: https://habr.com/ru/post/1794228/


All Articles