export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS
| /* | |
| * m1racle-poc: a basic proof of concept for the M1RACLES vulnerability in the Apple M1. | |
| * | |
| * This program allows you to read and write the state of the s3_5_c15_c10_1 CPU register. | |
| * | |
| * Please visit m1racles.com for more information. | |
| * | |
| * Licensed under the MIT license. | |
| */ |
| #!/bin/bash | |
| # The default BAR address space available on the CM4 may be too small to allow | |
| # some devices to initialize correctly. To avoid 'failed to assign memory' | |
| # errors on boot, you can increase the range of the PCIe bus in the Raspberry | |
| # Pi's Device Tree (a .dtb file specific to each Pi model). | |
| # | |
| # You should probably read up on Device Trees if you don't know what they are: | |
| # https://www.raspberrypi.org/documentation/configuration/device-tree.md | |
| # |
| #!/bin/bash | |
| # Attempt to set up the Nvidia GeForce GT 710 on a Pi CM4. | |
| # | |
| # I have tried both armv7l and aarch64 versions of the proprietary driver, in | |
| # addition to the nouveau open source driver (which needs to be compiled into | |
| # a custom Raspberry Pi kernel). | |
| # | |
| # tl;dr - None of the drivers worked :P |
| import sys | |
| from struct import pack as pk, unpack as up | |
| def u32(x): | |
| return x & 0xFFFFFFFF | |
| def tea_update_custom_mac(mac, v, k): | |
| v0, v1 = v[0], v[1] | |
| cur_sum = 0xC6EF3720 | |
| k0, k1, k2, k3 = k[0], k[1], k[2], k[3] |
| #include <stdio.h> | |
| #include <curl/curl.h> | |
| int main(void) | |
| { | |
| CURL *curl; | |
| CURLcode res; | |
| curl = curl_easy_init(); | |
| if(curl) { |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
| @echo off | |
| echo Uninstalling KB3075249 (telemetry for Win7/8.1) | |
| start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart | |
| echo Uninstalling KB3080149 (telemetry for Win7/8.1) | |
| start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart | |
| echo Uninstalling KB3021917 (telemetry for Win7) | |
| start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart | |
| echo Uninstalling KB3022345 (telemetry) | |
| start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart | |
| echo Uninstalling KB3068708 (telemetry) |
| import sys | |
| import wave | |
| import struct | |
| # bit0 is a single period sine wave at 1024Hz with a given amplitude | |
| # bit1 is the same but with ~2.7 times the amplitude | |
| bits = [[0x00, 0x09, 0x12, 0x1A, 0x21, 0x27, 0x2C, 0x2F, 0x30, 0x2F, 0x2C, 0x27, 0x21, 0x1A, 0x12, 0x09, 0x00, 0xF6, 0xED, 0xE5, 0xDE, 0xD8, 0xD3, 0xD0, 0xD0, 0xD0, 0xD3, 0xD8, 0xDE, 0xE5, 0xED, 0xF6], [0x00, 0x18, 0x30, 0x46, 0x59, 0x69, 0x75, 0x7C, 0x7F, 0x7C, 0x75, 0x69, 0x59, 0x46, 0x30, 0x18, 0x00, 0xE7, 0xCF, 0xB9, 0xA6, 0x96, 0x8A, 0x83, 0x81, 0x83, 0x8A, 0x96, 0xA6, 0xB9, 0xCF, 0xE7]] | |
| bits[0] = [b^0x80 for b in bits[0]] | |
| bits[1] = [b^0x80 for b in bits[1]] | |
| bits[0] = struct.pack('%sB' % len(bits[0]), *bits[0]) |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <pthread.h> | |
| #include "uv.h" |