Menu
  • HOME
  • TAGS

Reading osx screenshot image in sandbox

objective-c,osx,screenshot,sandbox,appstore-sandbox

Use an NSOpenPanel to ask the user for access to either this file or the folder containing the screenshots. You will be able to then create a security scoped bookmark to get access on the same resource on subsequent launches of your app.

Chrome Extension: Do messages sent to tabs can be listen by any chrome extension

google-chrome-extension,sandbox

No. It will be broadcast in the contexts of your own extension ID to all frames within that tab. By that I mean that every frame has its own "page" context associated with it, and one context per every extension that injected scripts in it, and they are all isolated...

Battery Doctor cleaning up the cache from my app

ios,image,caching,sandbox

I agree with @rmaddy These kind of apps fill up the disk and RAM to force the OS cleanup. They probably do it multiple times and maybe/hopefully in some smart way.

How do I create sandbox users?

paypal,sandbox,paypal-sandbox

Once you create your account, You will find an menu "Dashboard" Click on that. After that in the side menu you will find Sandbox->accounts, here you will find create account button. For further refernce follow:- https://developer.paypal.com/docs/classic/lifecycle/sb_create-accounts/ ...

How can I bundle a command line utility in os x application on Mac App Store (using sandbox entitlement)

objective-c,osx,sandbox

I don't see a good way to do this. First, a clarification: the PATH is a list of directories that contain executables, not a list of executables; there's no way to add a single executable to the PATH. Instead, what you'd need to do is either put your executable into...

Write multiple files using OS X sandbox

objective-c,osx,cocoa,sandbox

Yes, you can easily ask for permission to write to a certain directory. You already know how to use NSOpenPanel to allow the user to select a directory - "or a directory being chosen using NSOpenPanel". When the user does that you get read/write permission on the directory, so you...

OSX Code Signature Invalid Exception when launched from Service on

objective-c,osx,sandbox,code-signing,finder

I suspect your service was launching an unsigned copy of your app which was inside your development directory. Your first crash indicated that the path was: /Users/USER/Library/Developer/Xcode/Archives/2015-02-02/MyApp 02-02-2015 6.02 pm.xcarchive/Products/Applications/MyApp.app/Contents/MacOS/MyApp The spctl command you posted checked the signature on: /Applications/MyApp.app. It may be that when you are logged in as...

Does MailChimp have a sandbox API with dummy data in it for testing?

rest,mule,sandbox,mailchimp,dummy-data

MailChimp doesn't currently provide a 'sandbox' account for API testing. I think your best bet would be to subscribe yourself and play around. I've found MailChimp's API to be super easy to use and mighty well documented, so I imagine you won't have too much trouble figuring it out without...

Is it safe to declare critical literals in “with (…) {…}” to sandbox code run within it?

javascript,security,sandbox,code-injection,with-statement

No, this is not secure. No matter what you do with your code's execution environment using with, it is still possible to retrieve the "real" global object using the following trick: var window = (function(){ return this }).call(undefined); This works because Function.call will use the global object as the value...

NodeJS: Run module method within sandbox

node.js,virtual-machine,sandbox

If the insideMethod function does not call or use functions/vlues from outside the context it shall run in, yes. You can convert any function in Javascript to a string. Doing vm.runInNewContext('('+module.insideMethod+')('+JSON.stringify(arg1)+"); could be what you want....

Java Sandbox API - Denying access in a used class

java,security,classloader,sandbox,securitymanager

I fixed my problem. The problem was that I was running this code on Windows. In Windows you have to grant all files read access. So adding the following line solved my problem. context.addFilePermission(FileAccess.READ, AccessType.PERMIT, new FilePrefixPermission("")); ...

Missing classes defined in window when eval in Sandbox

javascript,firefox-addon,sandbox,firefox-addon-sdk

I was trying to get the new class from the evalInSandbox result. That was the problem: I had to do it from the context: Components.utils.evalInSandbox(src, ctx); var res = new ctx[className]; ...

Cannot find Instant Payment Notification (IPN) simulator

paypal,sandbox

You can't find sandbox inside PayPal. SandBox is a test platform for developers where you can simulate payments. If your code works in SandBox then it will work in production enviroment with PayPal. You should register your developer account and begin to test. here you can simulate IPN...

Can't write to the general pasteboard

osx,cocoa,sandbox,nsview,nspasteboard

When using the general pasteboard, you have to clear it's contents to prepare it for new items. From the docs: Clears the existing contents of the pasteboard, preparing it for new contents. This is the first step in providing data on the pasteboard. Apple also provides a string constant for...

Linux: Is it possible to sandbox shared library code

linux,shared-libraries,sandbox

I don't think there is a clean way to do it. You could try: Catching segfaults and recovering from them (tricky, architecture specific, but doable) Replacing calls to malloc/calloc for the library with an instrumented version that would count the allocated space (how to replace default malloc by code) Alternatively...

Why cabal sandbox init does not change PATH like virtualenv does?

haskell,sandbox,cabal,package-managers

Yes, this how to use a sandbox. cabal sandbox init will create some files / directories for you that will keep track of the packages you have installed. cabal install some_package will install that package into the sandbox. You are more than welcome to install yesod-bin into a sandbox....

HDP 2.2 Sandbox Could not find SQOOP directory

hadoop,sandbox,sqoop,hortonworks-data-platform

It's in /usr/hdp/2.2.0.0-2041/sqoop/lib

QLPreviewView can not show the quicklook preview in sandbox

osx,cocoa,sandbox,appstore-sandbox,quicklook

Finally I have found the solution! refreshPreviewItem is an async call, so before Mac finishes loading the preview, the following api stopAccessingSecurityScopedResource immediately shutdown the access, as a result, Mac failed to load the preview successfully. so the solution is: do NOT call stopAccessingSecurityScopedResource here, keep the allowedURL's access right...

I need to run untrusted server-side code in a web app - what are my options?

python,lua,eval,sandbox

Here are a few ways you can run untrusted code: a docker container that runs the code, I would suggest checking codecube.io out, it does exactly what you want and you can learn more about the process here using the libsandbox libraries but at the present time the documentation is...

How to tell if a user's java code compiled successfully?

java,php,compilation,compiler-errors,sandbox

You can check the javac exit code. Here is a list of the javac exit code: static final int EXIT_OK = 0, // Compilation completed with no errors. EXIT_ERROR = 1, // Completed but reported errors. EXIT_CMDERR = 2, // Bad command-line arguments EXIT_SYSERR = 3, // System error or...

Extra binary shows up in Xcode archive

xcode,osx,cocoa,sandbox,code-signing

Ok, the 'A' seems to come from the the framework which by deafault is stored under /Versions/A, and this only seems to happen when its code signed

hCatalog page gives error - HortonWorks Sandbox

sandbox,hortonworks-data-platform,hcatalog

I suspect this is due to memory. Your memory should be at least 4096 MB.

Template for dev and sandbox environment in Azure VM

azure,testing,sandbox

The quickest way to setup the test environment on Azure is to make a custom VHD in which you can install all your Development Softwares just once and upload it to Azure. Then create a VM using that custom VHD and you're good to go. This can help you on...

How Google Native Client is sandboxed? Native application or Native Client?

google-chrome-extension,sandbox,google-nativeclient

You are confusing Native Client (which is a separate language / compiler with the result being executed sandboxed) with Native Messaging Host (which is explicitly not sandboxed). An extension can use both: it can use (but not bundle) a Native Host, and can include NaCl/PNaCl modules. Answering the titular question,...

Linux / Fedora sandboxing processes and filesystem changes

docker,sandbox,fedora,chroot,linux-containers

I think you are on the right track with Linux containers. The feature you want is a Union Mount, where processes see a layered filesystem, and write only to the top layer. Docker for example uses union mounts, but starts with a file system image as the lowest layer, not...

Saving a NSImage to disk on a sandbox app in cocoa - CRASH

osx,cocoa,sandbox,entitlements,nssavepanel

[NSSavePanel savePanel]; and [NSSavePanel openPanel]; simply don't work on OSX 10.10, 10.10.1 and 10.10.2 on storyboard apps. The solution given by Apple to me was "use Xibs". After having a long list of problems with storyboard apps on OSX, I don't use them anymore. "Use XIBS" is what I am...

what's the easiest way to setup a ruby/rails sandbox locally?

ruby-on-rails,ruby,sandbox

If you just want a ruby sandbox $ irb will do the trick. If you want a ruby on rails sand box $ rails c -s short for $ rails console ––sandbox. This command loads our Rails application, connects to the database and automatically starts a database transaction. All database...

How to sandbox PHP? [closed]

php,.htaccess,sandbox

There is a bunch of posts on S.O. that cover similar questions, though not really in a cookbook approach I guess. Probably because it depends on your exact requirements. See Exploitable PHP functions, http://serverfault.com/questions/462470/securing-phps-exec-and-others, Is there a way to execute php code in a sandbox from within php for better...

How to configure elastic search on Hadoop?

hadoop,elasticsearch,sandbox

These are the steps to configure elastic search on hadoop. STEP 1 create a table that u want to add the data, CREATE TABLE logs (type STRING, time STRING, ext STRING, ip STRING, req STRING, res INT, bytes INT, phpmem INT, agent STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t';...

Is it possible to have CSP only apply to the parent frame, not any iframes?

html,iframe,sandbox,content-security-policy

It is not possible. The are only two ways to accomplish what you're after: Alter the CSP rules of the parent page to whitelist your arbitrary code (I would suggest using a CSP nonce or hash for your arbitrary content rather than unsafe-inline). Point your iframe to an external (sub)domain...

Trying out “cabal sandbox init” and cabal not recognizing the command “sandbox”

haskell,sandbox,cabal

Is your Cabal/cabal-install version new enough? Sandboxes were introduced in Cabal 1.18. You can check the version with command cabal --version. You might be able to upgrade with these commands: cabal update cabal install Cabal cabal-install ...

How to use hardcoded file path names with sandbox

osx,cocoa,core-data,sandbox

Sandbox doesn't mean there isn't any access to files and folders without user selection. As it said in App Sandbox in Depth article there's container directory you still having access to. For taking a path to your Application Support-directory you should use the same code whenever you use Sandboxing or...

Install python 2.6 in a sandbox/virt-env

python,virtualenv,sandbox

Virtualenv won't really install a new python version from scratch, but rather copy one of the versions installed on your system. That's why you first need to get a python2.6 binary for Ubuntu 14.04. It seems they don't officially support python2.6 anymore, so either you manually download and install it...

Making Test Requests from Unity3D

c#,paypal,unity3d,paypal-sandbox,sandbox

It should work if you change the serverURL parameter to "https://www.sandbox.paypal.com", as denoted on the documentation available at https://developer.paypal.com/webapps/developer/docs/classic/lifecycle/sb_overview/ .

How can I get installed apps list in Windows Phone?

c#,windows-phone-8.1,sandbox

Getting info about other apps requires some special/restricted capabilities that are only available to apps that are developed by Microsoft and its partners (Qihoo 360 is one of MS's partners). I can't find reference for WP but this is what I find about Windows Store app. App capability declarations- there...

Segregating sandbox environment

mysql,database-design,sandbox

In most situations, you'd want to keep two separate databases. There's no good reason to have the two intermingled in the same database, and a lot of very good reasons to keep them separated: Keeping track of which entities are in which "realm" (production vs. sandbox) is extra work for...

Firefox addonsdk sandboxing and require API

javascript,firefox,sandbox,firefox-addon-sdk,require

There is no global scope. You need to require XMLHttpRequest in foo.js.

iOS Is Testflight Autorenewable Subscription's expirationtime broken?

ios,in-app-purchase,sandbox,testflight

So, yes it is broken and it will never ever expire. Got this answer on Apple dev forums.

Game for programmers. Prevent system calls [closed]

c++,winapi,sandbox

Yes, native executables can make syscalls directly without the help of any module (DLL). You need a way to block the SYSENTER instruction. Or, use the OS's security, running these processes as a restricted user....

OSX Cocoa Bad Instruction crash

objective-c,osx,cocoa,sandbox,xcode6.1

Sounds like what Apple document here: OS X’s enforcement of container integrity impacts your development and distribution cycle. This is because, in the course of creating and distributing an app, the app is code signed using various signatures. Here’s how the process works: Before you create a project, you obtain...

Sending a file as a parameter to a container in order to be compiled causes problems

bash,docker,sandbox

Updated: The problem is -m codecube where the it says codecube directory already exists. Also, the /code directory is not present. If the user directory is already in place on your docker image (assuming a modified image being used here). Then just skel files copy should do the trick and...

Can a Chrome extension's content script guarantee that a DOM event was user-initiated?

javascript-events,google-chrome-extension,sandbox

You're looking for event.isTrusted, which has not yet been implemented. But it is still possible to detect whether a click event was user-initiated. The chrome.permissions.request API requires a user gesture, or else it will report a failure. The chrome.permissions API cannot be used in content scripts (since Chrome 33)....

iOS Move My Apps Saved File in Documents Dir to Another Computer

ios,cocoa,sandbox

You can enable File Sharing in your info.plist file for the app. This will give you manual read/write access to the app's document directory. Here is the raw XML: <key>UIFileSharingEnabled</key> <true/> Then when the iOS device is connected to a computer running iTunes, the app's document directory will be accessible...

Custom Properties on a SP2013 Sandboxed visual web part

c#,sharepoint-2013,web-parts,sandbox

Seems like you are going overboard with the custom editor. If you simply need those two web part properties than you don't need to create the custom editor. Your files can simply look like this: ChargeWebPart.ascx: <div> <table style="width:100%; border: 1px solid black;"> <tr> <td> <h3 style="text-align:center">Charge Calculator</h3> </td> </tr>...

pypy sandbox can't import time, import site fails

python,sandbox,pypy

Just went through the same issue. The solution is to include time module when building the pypy-c sandbox. In these instructions, add --withmod-time when building: pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone --withmod-time Other possible flags are listed here: http://pypy.readthedocs.org/en/latest/config/commandline.html...

Applescript: print first or other specific pages

printing,applescript,osx-mavericks,sandbox

You could script printing by command line tool lp & lpr. These talk to CUPS, Common Unix Printing System To target pages / ranges: lp -o page-ranges=2-4 "my_great_document.pdf" To call it from applescript use do shell script e.g, do shell script "lp -o page-ranges=2-4 'my_great_document.pdf'" For more ideas see: http://www.cups.org/documentation.php/options.html...

Create a helper app without Sandboxing

osx,sandbox

You can use [NSWorkspace launchApplication:] to launch your app from your helper.

SecureASTCustomizer: how to restrict loops?

java,groovy,sandbox

WHILE and FOR are statements. You should rather try adding them as statementsBlacklist instead of tokenBlacklist. List<Class> statementBlacklist = new ArrayList<>(); statementBlacklist.add( org.codehaus.groovy.ast.stmt.WhileStatement ); secure.setStatementsBlacklist( statementBlacklist ); ...