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 struct | |
import os | |
contents = open("resource.RFH", "rb").read() | |
blob_f = open("resource.RFD", "rb") | |
def huff_decompress(data): | |
bits = 0 | |
node = struct.unpack("<H", data[4:6])[0] | |
decomp = "" |
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
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <time.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
void writestr(int fd, const char* str) { | |
write(fd, str, strlen(str)); | |
} |
-> https://blog.aheymans.xyz/old-how-to-flash-coreboot-to-the-thinkpad-x60-the-proper-way/ is more up to date
This is a problem since the first code that runs on the CPU comes from there and if we ever want to run coreboot the cpu must start with coreboot code. This write protection is set in the PBR (protect bios range) registers on the southbridge, there is currently no known way to change them back once they are locked by setting the SPI Configuration Lock-Down bit.
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
#!/bin/env python | |
""" | |
A hook to git that removes orphan files "*.pyc" and "*.pyo" for "*.py" | |
beeing deleted or renamed by git checkout. It also removes their empty parent | |
directories. | |
Place it to "my_local_repository/.git/hooks/post-checkout" and make it executable. | |
Nothing is cleaned for .py files deleted manually or by "git rm" etc. | |
Related to http://stackoverflow.com/q/1504724/448474 | |
""" | |
import glob |
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
""" | |
This file contains code that, when run on Python 2.7.5 or earlier, creates | |
a string that should not exist: u'\Udeadbeef'. That's a single "character" | |
that's illegal in Python because it's outside the valid Unicode range. | |
It then uses it to crash various things in the Python standard library and | |
corrupt a database. | |
On Python 3... well, this file is full of syntax errors on Python 3. But | |
if you were to change the print statements and byte literals and stuff: |