This file contains hidden or 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
| cd /path/to/usb-drive | |
| touch .metadata_never_index |
This file contains hidden or 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
| // | |
| // main.c | |
| // usblog | |
| // | |
| #include <assert.h> | |
| #include <stdio.h> | |
| #import <IOKit/usb/IOUSBLib.h> |
This file contains hidden or 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
| io_service_t usbDevice; | |
| int action = 0; | |
| while ((usbDevice = IOIteratorNext(iterator))) { | |
| get_usb_device_info(usbDevice, newdev); | |
| IOObjectRelease(usbDevice); | |
| } |
This file contains hidden or 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
| //gcc -o test_ez_read test_ez_read.c -lusb | |
| #include <string.h> | |
| #include <errno.h> | |
| #include <stdio.h> | |
| #include <stdarg.h> | |
| #include <usb.h> | |
| //Define | |
| #define USB_VENDOR 0x1f00 |
This file contains hidden or 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
| #!/opt/local/bin/php71 | |
| <?php | |
| // Usage: | |
| // ./itunes_storefront_ids_scraper.php > itunes_storefront_ids.pl | |
| // Maybe we'll need to update those for future iTunes versions. With the user | |
| // agent and store front HTTP headers, we trick the server into thinking that | |
| // our requests come from iTunes. | |
| const ITUNES_USER_AGENT = |
This file contains hidden or 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
| diskutil disableJournal /Volumes/Mac\ OSX\ usb |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <IOKit/IOKitLib.h> | |
| #include <IOKit/usb/IOUSBLib.h> | |
| #include <IOKit/hid/IOHIDKeys.h> | |
| CFStringRef find_serial(int idVendor, int idProduct) { | |
| CFMutableDictionaryRef matchingDictionary = IOServiceMatching(kIOUSBDeviceClassName); |