Skip to content

Instantly share code, notes, and snippets.

@DuqueDeTuring
DuqueDeTuring / msg_test.go
Created October 25, 2023 02:36 — forked from dcormier/msg_test.go
golang: parsing emails with mime, mime/multipart and net/mail packages
pacakge msgtest
import (
"io"
"mime"
"mime/multipart"
"net/mail"
"net/textproto"
"os"
"path/filepath"
@DuqueDeTuring
DuqueDeTuring / killbutmakeitlooklikeanaccident.sh
Created July 21, 2022 01:01 — forked from moyix/killbutmakeitlooklikeanaccident.sh
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
#!/bin/bash
# This is free and unencumbered shell script released into the public domain.
#
####################### Begin Customization Section #############################
#
# Name of the recipe to fetch. You can run:
# ebook-convert --list-recipes
# to look for the correct name. Do not forget the .recipe suffix
RECIPE="La Jornada (Mexico).recipe"
@DuqueDeTuring
DuqueDeTuring / sha1-hash.clj
Created September 20, 2012 22:08 — forked from prasincs/sha1-hash.clj
clojure sha1 hash
(defn get-hash [type data]
(.digest (java.security.MessageDigest/getInstance type) (.getBytes data) ))
(defn sha1-hash [data]
(get-hash "sha1" data))
(defn get-hash-str [data-bytes]
(apply str
(map
#(.substring