Skip to content

Instantly share code, notes, and snippets.

diff -uprN -X linux-3.18-original/Documentation/dontdiff linux-3.18-original/drivers/platform/x86/apple-gmux.c linux-3.18-patched/drivers/platform/x86/apple-gmux.c
--- linux-3.18-original/drivers/platform/x86/apple-gmux.c 2014-12-07 23:21:05.000000000 +0100
+++ linux-3.18-patched/drivers/platform/x86/apple-gmux.c 2014-12-14 22:14:54.925688939 +0100
@@ -22,6 +22,10 @@
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/vga_switcheroo.h>
+#include <linux/seq_file.h>
+#include <linux/uaccess.h>
+#include <linux/fs.h>
@0xbb
0xbb / README.md
Last active December 17, 2022 02:13
Macbook Pro 11,3 - Linux - AppleMuxControl reverse engineering
@0xbb
0xbb / EcoServer_Entry_X6_Hardware.md
Last active August 29, 2015 14:16
Server4You: EcoServer Entry X6 Hardware

###/proc/cpuinfo

processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 75
model name	: AMD Athlon(tm) 64 X2 Dual Core Processor 3400+
stepping	: 2
microcode	: 0x62
cpu MHz		: 1000.000
@0xbb
0xbb / bfc.py
Last active August 29, 2015 14:20
Brainfuck compiler in Python for x86_64 Linux
#!/usr/bin/env python
# Usage: ./bfc.py source.bf > out.S && as out.S -o out.o && ld out.o
import sys
print("""
.intel_syntax noprefix
.global values
.data
cells:
@0xbb
0xbb / bfi.py
Created May 19, 2015 17:02
Brainfuck interpreter in Python
#!/usr/bin/env python3
# Usage: ./bfi.py source.bf
import sys
with open(sys.argv[1]) as f:
py_program = "import sys;cells = [0]*30000;ptr = 0\n"
level = 0
for i in f.read():
py_program += " "*level
if i == '>':
@0xbb
0xbb / bfi.py
Created May 19, 2015 17:03
Brainfuck interpreter in Python
#!/usr/bin/env python3
# Usage: ./bfi.py source.bf
import sys
with open(sys.argv[1]) as f:
program = f.read()
cells = [0]*30000
ptr = 0
pc = 0
label_stack = []
@0xbb
0xbb / tlsrand.py
Last active October 17, 2015 23:35
Sends a TLS 1.2 Client Hello and extracts the resulting random bytes from the Server Hello
#!/usr/bin/env python3
# Usage: ./tlsrand server port
import socket
import sys
hello = bytearray([3, 3]) # Version: TLS 1.2
hello += bytearray([0]*32) # Random
@0xbb
0xbb / vpsmark
Created October 30, 2015 12:09
Small bash script to unscientifically benchmark Virtual Private Server (VPS)
#!/bin/bash
apt-get install -y bzip2 gzip xz-utils php5-cli php5-xdebug wget time build-essential bc
rm -rf vpsmark-test
mkdir vpsmark-test
cd vpsmark-test
model=$(grep '^model name' -m1 /proc/cpuinfo | sed -r "s/model name.*: *(.*)/\1/")
cores=$(grep -c ^processor /proc/cpuinfo)
@0xbb
0xbb / sshrand.py
Created November 27, 2015 13:10
Sends a SSH 2.0 message to steal the entropy from your server
#!/usr/bin/env python3
# Usage : ./sshrand.py server port
import socket
import sys
s = socket.socket()
s.connect((sys.argv[1], int(sys.argv[2])))
version = s.recv(4096)
@0xbb
0xbb / ga-z170-hd3p.md
Last active February 25, 2016 13:38
GA-Z170-HD3P - Linux Support

GA-Z170-HD3P (rev. 1.0) - Linux Support

Tested with Debian Stretch (Linux 4.3) + Intel Core i5-6600K

Status:

  • UEFI boot Kernel: works
  • LAN network: works
  • Serial ATA: works
  • CPU Frequency Scaling: works
  • Sleep / Suspend: works
  • Xorg: works