• iPhone,  JAMF

    Transfer Text In And Out Of The iOS Simulator Using xcrun

    In a previous article, I covered creating, starting, and stopping iOS simulations. macOS comes with a handy tool to interact with the clipboard (aka pasteboard) on a Mac called pbcopy. You can redirect information from a file into your clipboard using the pbcopy command. Here, we’ll simply call pbcopy and then a file path pbcopy ~/Desktop/transfer.txt You can then redirect your text into simctl by doing a pbpaste into xcrun simctl pbpaste booted Once you’ve copied your data, clean up the transfer file: rm ~/Desktop/transfer.txt You can also pull text out. If you write data into the clipboard (e.g. during instrumentation) then you can extract it from that pasteboard using…

  • Mac Security

    Controlling Multiple launchagents and launchdaemons concurrently

    Most of my examples for launchctl have been per-user, per-agent, per-daemon. But you can also control multiple launchctl targets concurrently. One example would be that you can unload everything in the user domain by not specifying a path but providing the userid. In the following example, we’ll just use $userid as a variable, but it’s worth noting that that would be, as an example, 501 for the : sudo launchctl bootout gui/$userid There’s another option that can be used to do the opposite from within single user mode, called bootshell. Bootshell is called similarly from single user mode: sudo launchctl bootshell

  • iPhone,  JAMF,  Mac OS X

    Approve Or Deny GSuite Access For Devices

    The Google Directory integration with GSuite allows you to manage which devices have access to GSuite. This allows you to control access based on a variety of factors. Below, you’ll find a Google Cloud Function that is meant to respond to a webhook. This function takes an action to set a device into ‘approve’ or ‘deny’ as a state within Google Directory. Before using the function you’ll want to set CustomerID, ResourceID, and EMAIL_ACCOUNT for your GSuite account before using. To setup a GSuite Account for Google Functions and grab the ResourceID (or JWT), see: https://krypted.com//cloud/setup-google-cloud-functions/ To obtain the customer ID: https://krypted.com//uncategorized/get-your-customerid-from-g-suite/ Once you have all that, you can upload…

  • Mac OS X,  Mass Deployment

    Manage the Look of Launchpad

    You can control the number of columns and rows in LaunchPad. To do so, edit the com.apple.doc defaults domain with the key springboard-rows for the number of rows to display and springboard-columns to control the number of columns displayed. So to set the number of rows LaunchPad will show per screen, send the write verb into defaults for com.apple.dock along with the springboard-rows and an -int of 4: defaults write com.apple.dock springboard-rows -int 4 Likewise, to set columns to 8: defaults write com.apple.dock springboard-columns -int 8 Then just killall for Dock: killall Dock In some cases you will also need to send a resetlaunchpad boolean into com.apple.dock (for TRUE) along…

  • cloud

    Setup Google Cloud Functions

    Google Cloud Functions provide a streamlined method for running a simple micro-service leveraging custom functions as well as SDKs for any Google service that can be imported into your script. Currently, node.js is the only non-beta language you can build scripts in. Permissions Before you setup Google Cloud Functions in your G Suite domain, first provide the account of a developer with the appropriate permissions, identified in the attached screen.  Enable The SDKs You Need G Suite has a number of features exposed to their API by importing SDKs into projects. As an example, the Admin SDK provides us with endpoints and classes that make developing micro services to perform…

  • Mac OS X,  Swift

    Frameworks

    A framework is a type of bundle that packages dynamic shared libraries with the resources that the library requires, including files (nibs and images), localized strings, header files, and maybe documentation. The .framework is an Apple structure that contains all of the files that make up a framework. Frameworks are stored in the following location (where the * is the name of an app or framework): /Applications/*contents/Frameworks /Library/*/ /Library/Application Support/*/*.app/Contents/ /Library/Developer/CommandLineTools/ /Library/Developer/ /Library/Frameworks /Library/Printers/ /System/iOSSupport/System/Library/PrivateFrameworks /System/iOSSupport/System/Library/Frameworks /System/Library/CoreServices /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/local/Frameworks  If you just browse through these directories, you’ll see so many things you can use in apps. You can easily add an import followed by the name in your view…