As of macOS 12 (Monterey), Apple's Virtualization framework has nice support for macOS guest virtual machines, but with severe limitations: For example you can't install a macOS guest on Intel Macs, install guests with newer versions of macOS than the host, copy and paste between the host and the guest, or install third party kernel extensions in the guest. As usual for Apple, the functionality they do support is nicely implemented, but they've left out so much that the result is only marginally useful -- at least compared to
import os | |
import shutil | |
""" | |
Steps to retrieve the IPA file from the Configurator app: | |
1. Install Apple Configurator from the Mac App Store and sign in | |
2. Connect your iOS device to your Mac | |
3. Select "Add > Apps..." and search for the app you want to install, click "Add" | |
4. The newer Apple Configurator deletes the IPA after installing it, so you'll need to use this tool to grab it |
You can inherit the environment variables from PID 1 by iterating over the list of null-terminated strings
in /proc/1/environ
, parsing the first characters up to the first =
as the variable name, setting the
remaining value as that variable, and exporting it.
The Code Snippet
This works with multiline environment variables, and environment variables with arbitrary values, like
strings, including =
or JSON blobs.
Paste this in your current terminal session to inherit the environment variables from PID 1:
To pass wireguard's traffic through a TCP tunnel by using udp2raw
For Arch linux, install udp2raw by pacman:
pacman -S udp2raw
For Debian or Ubuntu, you can use a binary release from: https://github.com/wangyu-/udp2raw/releases
import requests | |
import xmltodict | |
import wget | |
import glob | |
# Replace with your email and password | |
email = None | |
password = None | |
MAC = 'XX:XX:XX:XX:XX:XX' # Replace with MAC address from your iPhone |
Today I wanted to move existing APFS-resident macOS Catalina installation to a new disk. I upgraded my late 2014 Mac Mini with a shiny new 1TB SSD. This took way too many hours of my life I will never get back. Hope this saves some time to you.
Good news:
- it is possible to create a DMG image from existing APFS container with macOS Catalina installation including metadata needed for complete restore (the DMG contains OS, OS Data, Preboot, Recovery and VM volumes)
- it is possible to restore this DMG image into empty APFS container and get a bootable copy of the original system
This information is relevant for Catalina (I'm currently running macOS 10.15.1).
/* global chrome, MediaRecorder, FileReader */ | |
chrome.runtime.onConnect.addListener(port => { | |
let recorder = null | |
port.onMessage.addListener(msg => { | |
console.log(msg); | |
switch (msg.type) { | |
case 'REC_STOP': | |
console.log('Stopping recording') | |
if (!port.recorderPlaying || !recorder) { |
- Install the Connection Manager that is launched when you connect the modem to the Mac
- Download the source of
usb_modeswitch
from here http://www.draisberghof.de/usb_modeswitch/ (at the moment of writing this the file appears with the name usb-modeswitch-2.5.2.tar.bz2) - Run
make
in the directory of the source you downloaded - Run
sudo ./usb_modeswitch -v12d1 -p1505 -X
in the same directory
If the last step returns an error (I don't remember the error now, but I was getting an error related to usb_modeswitch
not being able to take control of the modem to perfom changes):
- Unplug the modem and plug it again
- As soon as you plug the modem again, run
sudo ./usb_modeswitch -v12d1 -p1505 -X
repatedly until you get a successful result - Open Connection Manager and your modem is going to be detected
{ | |
"hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2375"], | |
"registry-mirrors": [], | |
"insecure-registries": [ | |
"172.16.197.20:5000" | |
] | |
} |
# Load the contents of the receipt file | |
receipt_file = open('./receipt_data.bin', 'rb').read() | |
# Use asn1crypto's cms definitions to parse the PKCS#7 format | |
from asn1crypto.cms import ContentInfo | |
pkcs_container = ContentInfo.load(receipt_file) | |
# Extract the certificates, signature, and receipt_data | |
certificates = pkcs_container['content']['certificates'] | |
signer_info = pkcs_container['content']['signer_infos'][0] |