This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Warning - because of how this works, it loads classes into memory namespace. | |
# Attempting to load a second Xcode to inspect within the same python run will result in errors | |
# If you need to inspect multiple, for now, just spin the inspection up under a second process | |
from Foundation import NSBundle | |
def xcode_info(app_path): | |
# app_path = '/Applications/Xcode.app' | |
DVTFoundation = NSBundle.bundleWithPath_('%s/Contents/SharedFrameworks/DVTFoundation.framework' % app_path) | |
IDEKit = NSBundle.bundleWithPath_('%s/Contents/Frameworks/IDEKit.framework' % app_path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python3 | |
from ctypes import c_int, c_void_p, POINTER, byref, c_ulong | |
from objc_util import ( | |
load_framework, c, ns, ObjCInstance, nsdata_to_bytes, NSString, NSData, NSNumber, | |
ObjCClass, NSArray, NSDictionary | |
) | |
from enum import Enum, IntFlag | |
from typing import Union | |
import datetime |
Following mining and findings performed on EVGA GeForce GTX 1070 SC GAMING Black Edition Graphics Card cards.
First run nvidia-xconfig --enable-all-gpus
then set about editing the xorg.conf
file to correctly set the Coolbits
option.
# /etc/X11/xorg.conf
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
If you haven't installed any FUSE yet:
brew tap homebrew/fuse
brew install Caskroom/cask/osxfuse
brew install qemu ext4fuse
qemu-img convert -p -O vmdk snapshot.qcow2 system.vmdk
This will take some time...- Download and register for a free licence of VMDK Mounter for Mac® OS X and install it.
- Reboot your macOS device.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import CDLL, Structure, POINTER, c_int64, c_int32, c_int16, c_char, c_uint32 | |
from ctypes.util import find_library | |
import time | |
c = CDLL(find_library("System")) | |
# https://opensource.apple.com/source/Libc/Libc-1158.50.2/include/NetBSD/utmpx.h.auto.html | |
# https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man3/endutxent.3.html#//apple_ref/doc/man/3/endutxent | |
BOOT_TIME = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Foundation import NSBundle | |
import objc | |
CoreServices = NSBundle.bundleWithIdentifier_('com.apple.CoreServices') | |
functions = [ | |
('_LSCopyRunningApplicationArray', '@I'), | |
('_LSCopyApplicationInformation', '@I@@'), | |
] | |
constants = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import objc | |
from ctypes import c_char | |
from Foundation import NSBundle | |
Security = NSBundle.bundleWithIdentifier_('com.apple.security') | |
S_functions = [ | |
('SecKeychainGetTypeID', 'I'), | |
('SecKeychainItemGetTypeID', 'I'), | |
('SecKeychainAddGenericPassword', 'i^{OpaqueSecKeychainRef=}I*I*I*o^^{OpaqueSecKeychainItemRef}'), | |
('SecKeychainOpen', 'i*o^^{OpaqueSecKeychainRef}'), |