sandbox

Access window variable from Content Script [duplicate]

本小妞迷上赌 提交于 2019-11-27 00:51:52
This question already has an answer here: Chrome extension - retrieving global variable from webpage 5 answers Hijacking a variable with a userscript for Chrome 1 answer I have a Chrome Extension that is trying to find on every browsed URL (and every iframe of every browser URL) if a variable window.my_variable_name exists. So I wrote this little piece of content script : function detectVariable(){ if(window.my_variable_name || typeof my_variable_name !== "undefined") return true; return false; } After trying for too long, it seems Content Scripts runs in some sandbox. Is there a way to access

What is the safest way to run an executable on Linux?

穿精又带淫゛_ 提交于 2019-11-26 23:04:31
问题 I am trying to run a program compiled from C code from an unknown source. I want to make sure that the program does not harm my system in anyway. Like for instance, the program might have soemthing like system("rm -rf /") in the source, which is un-detectable, unless the code is thoroughly examined. I thought of the following 2 ways Run it inside a VM like VMWare Build a windows exe on linux and run on wine Both are not very elegant solutions and I cannot automate them. and also, in case of 1

Why In-App purchase sandbox always ask “Verification Required”?

与世无争的帅哥 提交于 2019-11-26 22:57:32
问题 I have signed out from the store in device settings. I entered user credentials only in my App. I have set up a brand new (actually around 4 times) test user. Why this message keep poppin' up? Is it something connected to iOS 5, automatic app sync, or iCloud? 回答1: I had exactly same problem with sandbox in-app purchases, in built-in model (no receipt verification), app received valid products, now i called addPayment, everything alright. But now "Verification required" appeared and payment

UIImage Saving image with file name on the iPhone

南笙酒味 提交于 2019-11-26 22:53:28
How can I save an image (like using UIImageWriteToSavedPhotosAlbum() method) with a filename of my choice to the private/var folder? Kenny, you had the answer! For illustration I always think code is more helpful. //I do this in the didFinishPickingImage:(UIImage *)img method NSData* imageData = UIImageJPEGRepresentation(img, 1.0); //save to the default 100Apple(Camera Roll) folder. [imageData writeToFile:@"/private/var/mobile/Media/DCIM/100APPLE/customImageFilename.jpg" atomically:NO]; UIImageWriteToSavedPhotosAlbum() is only used for saving to the photos camera roll. To save to a custom

iOS In App Purchase: test a real purchase without submitting to Apple

走远了吗. 提交于 2019-11-26 22:49:13
问题 I implemented in app purchase in my iOS app and I want to do a real test (not a sandbox) before submitting this new version to Apple Of course, the current version of the app (in the App Store) was validated with a product So, I archived the app using an Ad Hoc distribution profile and I generated an IPA file for Ad Hoc deployment. But when I installed the app via Testflight on my device, I discovered that the app was in sandbox environment! Is there a way to do a "real" purchase before

How to create sandbox in C# for external process?

帅比萌擦擦* 提交于 2019-11-26 22:48:29
问题 How to create sandbox in C# for external process? As sandbox I understand an environment for process I start from C#, that stop that process from interfering with anything else - kernel, system variables, system configuration, memory, registry, disk, hardware, location other than starting place and so on. I want place executable in one place and be sure that this place is only place that can be changed by this process. Additionally, executable can be written in C, C++, C# and etc. 回答1: If you

How to disable socket creation for a Linux process, for sandboxing?

假装没事ソ 提交于 2019-11-26 21:19:33
问题 I'm considering several options for sandboxing a Linux process. Using clone() with CLONE_NEWNET (etc.) is one of the options. CLONE_NEWNET ensures that the the sandboxed process cannot make or accept real network connections. But I'd like to disable sockets entirely for that process, even bind() ing to any port on 0.0.0.0 , and binding to a Unix doman socket (even anonymous). I'd like to do this to prevent the process from using too much kernel resources by binding to thousands of ports. How

Mac sandbox created but no NSUserDefaults plist

夙愿已清 提交于 2019-11-26 21:16:59
问题 I'm trying to track down some issues arising from sandbox creation. Under multiple circumstances it appears that an NSUserDefaults .plist file is not created in Data/Library/Preferences. I have seen this in the debugger and when launching the app from the Applications directory. I have not tried archiving, signing the app and then launching. Is that required? An alias file ending in .LSSharedFileList.plist is created but it points to itself and therefore does not exist. I don't know if it's

Evaluate math equations from unsafe user input in Python

喜夏-厌秋 提交于 2019-11-26 20:09:07
问题 I have a website where the user enters math equations (expressions) and then those equations are evaluated against data (constants) provided by the website. The math operations needed include symbols, arithmetic operations, min() , max() and some other basic functions. A sample equation could be: max(a * b + 100, a / b - 200) One could simply eval() this using Python, but as we all know this leads compromising the site. What would be the safe approach of doing math equation evaluation? What

Is there a PHP Sandbox, something like JSFiddle is to JS? [closed]

前提是你 提交于 2019-11-26 19:11:01
Is there a PHP Sandbox, something like JSFiddle is to JS? If you are just looking for an online site to play around with PHP code, try http://phpfiddle.org/ http://ideone.com/ https://codeanywhere.net/ http://www.tehplayground.com/ http://sandbox.onlinephpfunctions.com/ http://codepad.org/ https://eval.in/ http://codepad.viper-7.com/ (defunct) The most sophisticated is: http://3v4l.org/ It lets you test your code in all PHP versions starting from PHP4. If you want something for your local environment, the Runkit extension aims to provide a PHP Sandbox: Instantiating the Runkit_Sandbox class