sandbox

How can I block a Python stdlib module from being imported?

折月煮酒 提交于 2019-12-06 11:04:33
问题 In my Python script, I want to prevent certain stdlib modules, such as os and sys , from being imported. How would I accomplish this? 回答1: Taking you very literally, and if you just mean "to stub them out so that they won't be loaded by a straight import", not "make them unloadable by untrusted code", then: import sys sys.modules['os'] = None sys.modules['system'] = None Of course, there is no module system so you might have meant sys , in which case you're in trouble. If you're trying to

Autorenewable Subscriptions won't be autorenewed

╄→尐↘猪︶ㄣ 提交于 2019-12-06 10:51:39
Sorry for that millionth question on autorenewable subscriptions, but i don't get it. I've done everything as describet in Apples In-App Purchase Guidelines but it didn't solve the problem. My problem is that i have created autorenewable subscriptions but they won't be autorenewed. I've create a Payment Transaction Observer class, which implements the SKPaymentTransactionObserver interface. This class will be installed as a paymentObserver at Application startup in the viewDidLoad: method. PaymentTransactionObserver *observer = [[PaymentTransactionObserver alloc] init]; [[SKPaymentQueue

Sandbox Virtual Machine for an Application (concept)

旧街凉风 提交于 2019-12-06 09:43:50
I'd like to write a sandbox virtual machine for executing a compiled program. My goal is to isolate that program from the rest of operating system and control its execution so that it can't do anything harmful to a host computer. I assume that: executed program is compiled to Portable Executable format and it's in machine code, not in any kind of byte code or for CLR, executed program is not allowed to communicate with peripherals like printer, scanner, and doesn't use any GUI, executed program's main task is to process some data stored in a local file (eg. calculations), and put its results

Copy a file from iPhone sandbox to Desktop?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 09:33:43
问题 I am developing an iPhone app for uni and we create an sqlite database file within the iPhone's sandbox directory. Our application writes internally to this file, I am wondering how it would be possible to get this file back to my desktop. I don't really mind how it can be done, any way is fine. Maybe it is possible to even do something like emailing it from the app (if that is possible). Just a suggestion if anyone knows a way. Thanks in advance. 回答1: You can use the Organizer. Connect your

How do I get started with libsandbox

断了今生、忘了曾经 提交于 2019-12-06 09:12:06
I'm trying to write a simple judge that will compile and execute user submitted c files. I found libsandbox and a question here on stackoverflow. I have installed the python module and as per the instructions I'm trying to run a hello world program written in C ➜ sandbox git:(V_0_3_x) ✗ ./hello Hello World% ➜ sandbox git:(V_0_3_x) ✗ python sample2.py hello result: RF cpu: 2ms mem: 288kB As you can see, when I run the program in the sandbox I don't get any output. It'd be great if someone could tell me how to correctly use it. The sample code of libsandbox forbids system calls for file

How to retrieve the sandbox of my app using Eclipse from my device?

喜夏-厌秋 提交于 2019-12-06 07:38:43
I have an android app which uses sharedPreferences . I run the app in my android device using Eclipse I would like to pull the entire sandbox from the device to desktop so that I can manually see the contents of the sharedPreferences. I clicked DDMS and clicked FileExplorer and saw data folder But its empty. Any help is appreciated ! Thanks in advance ! If device is rooted may be it's possible. But in general you can not retrieve the sandbox of your app from your device to pc. But you can achieve your goal which is getting the sandbox of your app by running your app on Android Virtual Device

How to create a Plugin Model in .NET with Sandbox?

ぃ、小莉子 提交于 2019-12-06 07:12:22
问题 Is there a way to load a .NET Assembly into a Sandbox environment that is also restricted in custom ways? I know you can run an Assembly in a different AppDomain, but can you limit it from being able to do certain things that you want to restrict? For example: I want to be able to load up a Plugin (simple, just defined via a specific interface) within a separate Assembly within an ASP.NET application, but I only want the plugin to be able to access certain Data Access Layer component and not

如何在Web应用里消费SAP Leonardo的机器学习API

跟風遠走 提交于 2019-12-06 07:11:07
去年5月的时候,Jerry曾经写了一篇文章:使用Java程序消费SAP Leonardo的机器学习API,而最近另外做的一个项目,需要在Web应用里做同样的事情。 因为有了前一篇文章的铺垫,避免了很多重复的工作量。本文还是选择使用SAP Leonardo里的一个Product Image Classification API,即给定一张产品的图片,该API能识别出此产品的类别。 再回顾下这个API的功能:该API的模型是由SAP基于大约5万张Icecat图片训练而成,能区分29种不同的类别,这些类别具体罗列于官方文档上,比如电脑显示器,数码相机,外部存储设备,键盘,液晶电视,手机充电器,笔记本和其他外设等等。如果我们消费这个API时指定的图片代表的产品不属于这29种类别之一,API的表现如何?先卖个关子,文末解答。 关于如何在api.sap.com里找到这个API并且在API console里测试,请参考Jerry之前的文章:使用Java程序消费SAP Leonardo的机器学习API。 这里假定我们已经找到了该API,点击进入明细页面,将API Key复制下来,后续的UI5应用需要使用到。 然后进入SAP云平台的Neo环境。Jerry这个练习,使用免费的SAP Cloud Platform Neo测试环境即可。 在Service列表里找到WebIDE—

Allow HID control for the sandboxed app

末鹿安然 提交于 2019-12-06 06:26:19
问题 We're trying to sandbox our app to submit it to the Mac App Store (for the first time). It makes hard use of the lower level Carbon APIs and cannot operate the other way. When I enabled the sandboxing, some features stopped working and I see this message in the log: 9/14/12 10:51:58.863 PM sandboxd[41243]: ([41237]) MouseRecorder(41237) deny hid-control Is there any hidden entitlement I could use or we have no chance in the App Store with this app? 回答1: Even tho I'm several years too late, I

Sandboxing a program using WinAPI hooks

非 Y 不嫁゛ 提交于 2019-12-06 06:02:36
I'd like to sandbox a native code and use hooking of WinAPI and system functions to block or allow this program to perform some operations like reading/writing files, modify Windows registry, using an Internet connection. Is it a good and secure way to do so? How difficult would it be for that program to bypass such a security layer? +1 to Hans, however if you are really into it then I can recommend Easyhook . I have personally used it successfully in Win XP, Vista and 7. I don't know how bypassable it is but other alternatives do exist - madSHI hooks, and, if you want to go the official way,