Skip to content

Instantly share code, notes, and snippets.

View u1735067's full-sized avatar

Alexandre L. u1735067

View GitHub Profile
@u1735067
u1735067 / mounts.py
Created February 23, 2016 21:15
Simple mount parser (modified)
"""Produce a table of mounted file systems on UNIX. Tested on Solaris 2.6,
Redhat Linux 6.2 and HP-UX 10.20.
Copyright 2001 WideAwake Ltd.
Permission is granted to use or modify this code for any purpose.
WideAwake Ltd accepts no liability for any loss or damage caused by use of
this code."""
# Found at http://www.gossamer-threads.com/lists/python/python/25546
import os
@u1735067
u1735067 / atlas_dns-geo-analysis.py
Last active July 23, 2016 03:57
RIPE Atlas : script to analyse geolocation of returned servers, based on probe's geolocation (or vice-versa)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# pip3 install requests dnslib geoip2 geonamescache
#
import sys, os, base64
import geoip2.database, geonamescache, geonamescache.mappers
import requests, dnslib
#import urllib.request, dns, dns.message
from pprint import pprint
@u1735067
u1735067 / fsck.aufs
Last active July 29, 2016 15:04
AUFS fsck based on fsck.mergerfs
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Based on https://github.com/trapexit/mergerfs-tools/blob/master/src/fsck.mergerfs
# © 2016, Antonio SJ Musumeci <trapexit@spawn.link>
# © 2016, Alexandre Levavasseur <alexandre@13x.fr>
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
@u1735067
u1735067 / yubikey4.js
Last active December 13, 2016 23:38
Yubikeys overall overview - WIP
{
man: "https://www.yubico.com/wp-content/uploads/2015/03/YubiKeyManual_v3.4.pdf",
??: "https://www.yubico.com/why-yubico/how-yubikey-works/",
downloads: "https://www.yubico.com/support/knowledge-base/categories/downloads/",
tools: "https://developers.yubico.com/Software_Projects/YubiKey_Device_Configuration/",
// Modes can be enabled or disabled using the Yubikey NEO Manager
modes: {
/*
* https://forum.yubico.com/viewtopic.php?f=35&t=2053 :
* - If you have U2F enabled, you should see Human Interface Devices > HID-compliant device.
@u1735067
u1735067 / centos7_generate_keyboard_layouts.md
Created May 18, 2017 15:02
GRUB2 on CentOS 7 -- Generate keyboard layouts

First, generate the layout in a format understood by GRUB2:

cd /boot/grub2/
mkdir layouts
cd layouts
xkb=/lib/kbd/keymaps/xkb; for layout in $(ls $xkb/); do zcat $xkb/$layout | grub2-mklayout -o ${layout/.map.gz/}.gkb; done 2>/dev/null
ls layouts
@u1735067
u1735067 / acd_cli_oa.py
Last active May 26, 2017 12:22
Version tensile-runway-92512 (rev1), which leaked tokens, and acd-api-oa (rev2)
#!/usr/bin/env python
import webapp2
import urllib
import urllib2
from google.appengine.api import memcache
import json
import logging
PRIVACY_HTML = ('<!DOCTYPE html><html><head><title>acd_cli_oa privacy info</title></head>'
@u1735067
u1735067 / P2Pub.json
Created June 11, 2017 07:00
BDE example image with associated output from Kaitai (Web IDE) – if you manage get a working key for this one, I might actually give you a reward.
{
"metadata": {
"bdeMetadataBlockHeaderCommon": {
"signature": [45, 70, 86, 69, 45, 70, 83, 45],
"size": 0x35,
"version": 0x2
},
"bdeMetadataBlockHeaderSpecific": {
"unknown1": [4, 0],
"unknown2": [4, 0],
@u1735067
u1735067 / event-log.xml
Last active August 25, 2017 23:22
Task Scheduler: error 2147943767 (0x80070557) when starting second action
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" />
<EventID>104</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>104</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2017-08-25T22:34:23.310635500Z" />
input_vendor_id = "1118"
input_product_id = "746"
===
input_vendor_id = "1118"
input_product_id = "765"
Lakka:~ # lsusb
Bus 001 Device 008: ID 045e:02ea Microsoft Corp.
Lakka:/etc/retroarch-joypad-autoconfig # udevadm info -p /sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.2/1-1.2\:1.0/bluetooth/hci0/hci0\:68/0005\:045E\:02FD.0007/
@u1735067
u1735067 / mobi.ksy.yml
Last active November 9, 2017 07:36
MOBI & PDB (Palm DataBase) container in kaitai lang
meta:
id: mobi
file-extension: mobi
endian: be
# https://wiki.mobileread.com/wiki/MOBI
seq:
- id: pdb_header
type: pdb_header_type
size: 78 # 0x4e