Skip to content

Instantly share code, notes, and snippets.

:atom:
πνεῦμα

Zhang Naville

:atom:
πνεῦμα
Block or report user

Report or block Naville

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@littlelailo
littlelailo / apollo.txt
Created Sep 27, 2019
Apple Bootrom Bug
View apollo.txt
This bug was also called moonshine in the beginning
Basically the following bug is present in all bootroms I have looked at:
1. When usb is started to get an image over dfu, dfu registers an interface to handle all the commands and allocates a buffer for input and output
2. if you send data to dfu the setup packet is handled by the main code which then calls out to the interface code
3. the interface code verifies that wLength is shorter than the input output buffer length and if that's the case it updates a pointer passed as an argument with a pointer to the input output buffer
4. it then returns wLength which is the length it wants to recieve into the buffer
5. the usb main code then updates a global var with the length and gets ready to recieve the data packages
6. if a data package is recieved it gets written to the input output buffer via the pointer which was passed as an argument and another global variable is used to keep track of how many bytes were recieved already
7. if all the data was recieved th
@uroboro
uroboro / find_offsets.sh
Last active Jul 23, 2019
v0rtex offset finder script
View find_offsets.sh
#!//bin/sh
export PATH=bin:$PATH
self=$0
function print_help() {
echo "$self [IPSW path]"
echo "$self [device model] [ios build]"
echo
View wine-retina.txt
iElk
Wednesday, February 1, 2017
Blurry font issue with Wine 2.0 on macOS 10.12.2
After installing the latest Wine release, which currently is 2.0 (I chose the development branch) on XQuartz 2.7.11, I was having problems with blurry text in both winecfg, regedit and other programs launched through Wine.
After trying to enable font smoothing and font replacements (source) with only slight changes I found someone trying to solve the same issues (source), albeit compiling everything from scratch which I don't want to do.
It turns out that the Retina display on my MacBook Pro was causing the issues with blurry fonts because Wine was not using the "real" resolution, only the reported "lower resolution".
To enable Retina support in Wine open the registry editor via a terminal, preferably through Wine Devel.app installed with Wine:
@codfish
codfish / rick-roll-terminal.sh
Last active Sep 28, 2018
Rick roll terminal prank
View rick-roll-terminal.sh
#!/bin/bash
#
# some shortcomings:
# - prankee needs to be running rvm, rbenv, or some other
# ruby version manager that doesn't require sudo permissions to
# install gems.
# - can be killed by simply closing current tab/session
#
# Any bug reports or suggestions on improvements are welcome!
#
@alloy
alloy / README.markdown
Created Aug 8, 2014
Learn the LLVM C++ API by example.
View README.markdown

The easiest way to start using the LLVM C++ API by example is to have LLVM generate the API usage for a given code sample. In this example it will emit the code required to rebuild the test.c sample by using LLVM:

$ clang -c -emit-llvm test.c -o test.ll
$ llc -march=cpp test.ll -o test.cpp
You can’t perform that action at this time.