Skip to content

Instantly share code, notes, and snippets.

View rene-d's full-sized avatar
🤘
Let There Be Rock

rene-d rene-d

🤘
Let There Be Rock
  • Thales
  • France
View GitHub Profile
#!/usr/bin/env python3
def chiffres(i):
return i // 100, (i // 10) % 10, i % 10
def bad(a, b, place, desordre, absent):
aa = a
a = chiffres(a)
@rene-d
rene-d / Dockerfile
Last active February 11, 2021 21:01
Build a more recent version of fuse-overlayfs for CentOS7/RHEL7
FROM centos:7 AS builder
RUN yum -y install gcc clang cmake automake python3-pip make git gcc-c++ vim glibc-static
RUN pip3 install meson ninja
WORKDIR /src
RUN git clone -b fuse-3.6.1 https://github.com/libfuse/libfuse && \
cd libfuse && \
#!/usr/bin/env python3
# rene-d 2020/07/23
from sys import argv
import operator
from PIL import Image, ImageDraw, ImageFont
import numpy as np
# import csv
import argparse
@rene-d
rene-d / README.md
Last active January 25, 2021 22:31

Le Polyglotte

Lien

Category : Stegano

Points : 150

Description

Nous avons intercepté un fichier top secret émanant d'Evil Country, il est très certainement en rapport avec leur programme nucléaire. Personne n'arrive à lire son contenu.

L'énigme de la crypte

Lien

Category : Crypto

Points : 200

Description

@rene-d
rene-d / api.sh
Created October 21, 2020 07:04
Some SNCF Wi-Fi endpoints
#!/bin/sh
curl -sO "https://wifi.sncf/assets/js/adminVersion.json"
mkdir -p api/train api/food api/videos api/configuration api/connection api/analytics api/bar api/travel api/chat
mkdir -p api/sync/faq api/sync/rules
curl -s "https://wifi.sncf/router/api/train/gps" > api/train/gps.json
curl -s "https://wifi.sncf/router/api/train/graph" > api/train/graph.json
@rene-d
rene-d / tgv_speed.sh
Created October 21, 2020 06:53
Show TGV speed in the Bash prompt
_tgv_speed()
{
LANG=C printf "%.f km/h" $(curl -s "https://wifi.sncf/router/api/train/gps" | jq -cr ".speed * 3.6")
}
PS1='\[\033[01;32m\]\u@\h\[\033[0;93m $(_tgv_speed)\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
#!/usr/bin/env bash
# https://en.wikipedia.org/wiki/ANSI_escape_code
print_colors()
{
# Print column headers.
echo -ne "\033[0m"
printf "%-4s " '' ${bgs[@]}
#!/usr/bin/env python3
# _ ____ _____ ______ ____ __
# / \ | _ \| ___/ ___\ \ / /\ \/ /
# / _ \ | | | | |_ | | _ \ \ / / \ /
# / ___ \| |_| | _|| |_| | \ V / / \
# /_/ \_\____/|_| \____| \_/ /_/\_\
# rene-d 2020
# références:
#!/usr/bin/env python3
# extract base64 <data> in XML plist
# use `plistutil` or `plist -convert xml1` to convert from binary
import xml.sax
from sys import argv
from base64 import b64decode
import re