Skip to content

Instantly share code, notes, and snippets.

@0xbb
0xbb / coffee.sh
Created Oct 28, 2016
i3blocks coffee
View coffee.sh
#!/bin/bash
while true;
do
xdotool mousemove_relative --sync -- 1 1
xdotool mousemove_relative --sync -- -1 -1
sleep 60
done
@0xbb
0xbb / macbook-mute.sh
Last active Jun 15, 2020
Turn off Macbook startup sound - Linux
View macbook-mute.sh
#!/bin/bash
printf "\x07\x00\x00\x00\x00" > /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82
@0xbb
0xbb / amd-r9-390x.md
Last active Feb 19, 2016
AMD R9 390X - Linux Support
View amd-r9-390x.md

AMD R9 390X - Linux Support

Tested with Debian Stretch (Linux 4.3), MSI - Radeon R9 390X Gaming 8G

lspci

lspci -v

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT [Radeon R9 290X] (rev 80) (prog-if 00 [VGA controller])
	Subsystem: Micro-Star International Co., Ltd. [MSI] Hawaii XT [Radeon R9 290X]
	Flags: bus master, fast devsel, latency 0, IRQ 132
@0xbb
0xbb / ga-z170-hd3p.md
Last active Feb 25, 2016
GA-Z170-HD3P - Linux Support
View ga-z170-hd3p.md

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
@0xbb
0xbb / sshrand.py
Created Nov 27, 2015
Sends a SSH 2.0 message to steal the entropy from your server
View sshrand.py
#!/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 / vpsmark
Created Oct 30, 2015
Small bash script to unscientifically benchmark Virtual Private Server (VPS)
View vpsmark
#!/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 / tlsrand.py
Last active Oct 17, 2015
Sends a TLS 1.2 Client Hello and extracts the resulting random bytes from the Server Hello
View tlsrand.py
#!/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 / bfi.py
Created May 19, 2015
Brainfuck interpreter in Python
View bfi.py
#!/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 / bfi.py
Created May 19, 2015
Brainfuck interpreter in Python
View bfi.py
#!/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 / bfc.py
Last active Aug 29, 2015
Brainfuck compiler in Python for x86_64 Linux
View bfc.py
#!/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:
You can’t perform that action at this time.