Skip to content

Instantly share code, notes, and snippets.

@m-242
m-242 / merger.py
Created November 17, 2022 13:04
Simple script to merge active directory user:hash exports and hashcat hash:password potfiles.
#!/usr/bin/env python3
import sys, getopt
def load_users_hash(filepath: str) -> list[str]:
"""Load the user:hash file in memory as an array"""
users_to_hash = []
with open(filepath, "r") as file_users:
for line in file_users:
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items {
opacity: 0;
pointer-events: none;
}
#main-window:not([tabsintitlebar="true"]) #TabsToolbar {
visibility: collapse !important;
}
:root { --thin-tab-width: 10px; }
:root { --wide-tab-width: 350px; }
default partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {
name[Group1]= "English (US)";
key <TLDE> { [ grave, asciitilde ] };
key <AE01> { [ 1, exclam ] };
key <AE02> { [ 2, at ] };
key <AE03> { [ 3, numbersign ] };
key <AE04> { [ 4, dollar ] };
@m-242
m-242 / notes.sh
Last active December 5, 2020 08:07
Note taking
#!/bin/sh
# A note simple note taking script, in Markdown format.
# Needs st and dmenu.
editnote() {
st "-c" 'Notes' "-i" "-e" "$EDITOR" "$1"
}
get_file() {
choice=$(printf \
@m-242
m-242 / redirectServer.py
Created March 26, 2020 10:54
A stupid redirection looping server, because why rewrite it each time I use it ?
from http.server import HTTPServer, BaseHTTPRequestHandler
class redirectHandler(BaseHTTPRequestHandler):
def do_GET(self):
""" Looping redirections """
path = "/a" if self.path == "/b" else "/b"
self.send_response(301)
self.send_header("Location", path)
William Gibson
Neuromancer
Dedication:
for Deb
who made it possible
with love
<?php
require_once(__DIR__ . '/../lib/functions_db.php');
require_once(__DIR__ . '/../lib/functions_input_sanatizing.php');
// Les fonctions utilisées
function check_login(){
// récup des valeurs du formulaire
public class Noeud {
private String etiquette;
private Noeud gauche;
private Noeud droit;
public Noeud(String etiquette, Noeud g, Noeud d){
this.etiquette = etiquette;
this.gauche = g;
this.droit = d;
}
/*
* @Author: m242
* @Date: 2019-02-25 09:41:21
* @Last Modified by: m242
* @Last Modified time: 2019-02-25 14:43:32
*/
class Automate{
// Attributs et accesseurs
private Cellule start;
private Cellule stop;
@m-242
m-242 / init.el
Created February 12, 2019 21:25
;;; init.el --- My try at making a clean emacs config that fits my needs
;;; Commentary:
;;; Code:
;;; Automatic stuff
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.