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
#!/usr/bin/env python3 | |
import struct | |
import sys | |
rom = open(sys.argv[1], 'rb').read() | |
pos = 0 | |
while True: | |
i = rom.find(b'HVQM2 1.0', pos) | |
if i == -1: |
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 <fcntl.h> | |
int main() | |
{ | |
// leak 100 file descriptors, on exit the kernel will close them in one go | |
for (int i = 0; i < 100; ++i) | |
open("/dev/input/event0", O_RDONLY); | |
} |
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
#!/usr/bin/env python | |
import sys | |
import os | |
import subprocess | |
import tempfile | |
def system(args, **kwargs): | |
environ = os.environ.copy() |