Skip to content

Instantly share code, notes, and snippets.

View superboum's full-sized avatar

Quentin Dufour superboum

View GitHub Profile
@superboum
superboum / README.md
Last active May 13, 2019 20:20
Scraper

Scraper

A full event-loop based scraper following a publish-subscribe model. Backed by Redis, so you need it (!) Requires a recent Python 3 installation. Install dependencies with pip3 install -r requirements.txt.

You can define your queues in config.json. You can reload the scraper without killing it with kill -s SIGHUP <pid> or systemctl reload service.

@superboum
superboum / ssha.py
Created May 6, 2019 11:57
Generate a valid LDAP SSHA
#!/usr/bin/python3
import getpass, sys, hashlib, os, base64
def makeSecret(password):
password = str(password).encode('utf-8')
salt = os.urandom(4)
h = hashlib.sha1(password)
h.update(salt)
return "{ssha}" + (base64.b64encode(h.digest() + salt)).decode('utf-8')
@superboum
superboum / streams2circuits.sh
Last active April 17, 2019 13:58
Tor Streams To Circuits Mapping
#!/bin/bash
declare -A circuits
declare -A streams
# CircuitID SP CircStatus [SP Path]
# We capture CircuitID and Path
while read l; do
id=$(echo $l|grep -Po '^\d+')
circ=$(echo $l \
@superboum
superboum / _README.md
Last active February 19, 2019 13:39
CoffeeSV

Install

On your machine :

wget https://gist.githubusercontent.com/superboum/aacc8bd880435f9760c4940e30041a05/raw/f1be7f8bfd8ca227f408dbafac6727e67d21e661/coffeesv
chmod +x coffeesv
sudo mv coffeesv /usr/local/bin
coffeesv Quentin
@superboum
superboum / LICENCE.txt
Last active June 9, 2025 02:27
Install Debian with Debootstrap + Grub EFI
MIT LICENSE
Copyright 2018 Quentin Dufour
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
@superboum
superboum / README.md
Last active November 28, 2018 14:29
Lisp things

Programming tricks

  • Continuation
    • Generators
    • Coroutine
    • Exceptions
    • Time-traveling search
    • Threads
  • Sideband data
  • Custodians
@superboum
superboum / README.md
Last active November 14, 2018 13:14
Installing TorFone on Fedora 29

TorFone has been developped for Windows. However it appears that it works pretty well with Wine on Linux.

This guide is targetting Fedora 29, but most of the instructions will be the same with other Linux distributions and even on Windows, it will be mostly the same steps.

You must start by installing required dependencies:

sudo dnf install wget wine tor unzip
const fs = require('fs')
const content = fs.readFileSync('single-host_latency.json').toString('utf-8').split("\n")
content.pop()
const parsed = content.map(JSON.parse)
console.log("Number of RTT measured for Tor Circuit 0:", parsed[0][10].length)
console.log("Number of Tor Circuit created:", parsed.length)
const broken_from_beginning = parsed.filter(l => l[10].length == 0).length
const broken_en_route = parsed.filter(l => l[10].length > 0 && l[10].length < 600).length
@superboum
superboum / 01.md
Last active September 17, 2018 05:53
Debug

Problem

Survive between 10 and 15 minutes between bootloops.

Observation

Print 2 lines in System Event Log during the freeze/reboot:

b2 | 09/15/2018 | 08:43:47 | Critical Interrupt #0x18 | Bus Fatal Error ( PCI bus:00 device:05 function:0) | Asserted
@superboum
superboum / log.txt
Created September 15, 2018 07:48
IPMI System Event Log List
1 | 08/28/2018 | 09:06:54 | Event Logging Disabled #0x72 | Log area reset/cleared | Asserted
2 | 09/09/2018 | 03:41:02 | Critical Interrupt #0x18 | Bus Fatal Error ( PCI bus:00 device:05 function:0) | Asserted
3 | 09/09/2018 | 03:41:02 | Unknown #0x1a | | Asserted
4 | 09/10/2018 | 22:56:41 | Critical Interrupt #0x18 | Bus Fatal Error ( PCI bus:00 device:05 function:0) | Asserted
5 | 09/10/2018 | 22:56:41 | Unknown #0x1a | | Asserted
6 | 09/13/2018 | 11:44:23 | Memory #0x1b | Transition to Non-critical from OK | Asserted
7 | 09/13/2018 | 11:45:05 | Memory #0x1b | Transition to Critical from less severe | Asserted
8 | 09/14/2018 | 02:48:02 | Critical Interrupt #0x18 | Bus Fatal Error ( PCI bus:00 device:05 function:0) | Asserted
9 | 09/14/2018 | 02:48:02 | Unknown #0x1a | | Asserted
a | 09/14/2018 | 00:51:09 | Critical Interrupt #0x18 | Bus Fatal Error ( PCI bus:00 device:05 function:0) | Asserted