Skip to content

Instantly share code, notes, and snippets.

View HarryR's full-sized avatar
🏴‍☠️
My time travel machine is stuck at 60 seconds per minute

HaRold HarryR

🏴‍☠️
My time travel machine is stuck at 60 seconds per minute
View GitHub Profile
@rverton
rverton / cowroot.c
Created October 21, 2016 14:06
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
@HarryR
HarryR / spider_DS_Store.py
Last active September 8, 2016 12:04
Spider .DS_Store files on a website
#!/usr/bin/env python
import requests
import sys
import requests
import os
from tempfile import mkstemp
from ds_store import DSStore
def main():
if len(sys.argv) < 2:
@badmofo
badmofo / borromean.py
Last active November 1, 2021 05:53
Pure Python Borromean Ring Signatures
'''
Pure Python Borromean Ring Signatures
DEPENDS ON: pip install ecdsa
WARNING: THIS IS A PEDAGOGICAL IMPLEMENTATION.
PERFORMANCE IS HORRIBLE AND NON-CONSTANT.
CORNER CASES ARE NOT PROPERLY CHECKED.
FOR THE LOVE OF GOD USE THE CODE FROM THE ELEMENTS PROJECT.
https://gist.github.com/badmofo/2d6e66630e4a6748edb7
'''
from hashlib import sha256
@HelloZeroNet
HelloZeroNet / opensslVerify2.py
Last active June 19, 2017 23:36
Alternative openssl verify
#!/usr/bin/env python
##
## @file contrib/verifymessage/python/terracoin_verifymessage.py
## @brief terracoin signed message verification sample script.
## @author unknown author ; found on pastebin
##
import ctypes
import ctypes.util
import hashlib
@xnyhps
xnyhps / gist:33f7de50cf91a70acf93
Created July 4, 2014 14:29
mod_onions: Install instructions on Debian
# Add the Prosody repository, because we want the latest version
echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list
wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
sudo apt-get update
# Install tor and prosody, and lua-bitop, which is required for mod_onions
sudo apt-get install prosody tor lua-bitop
# Prepare the directories where Tor will store the hidden service's private key
@nlitsme
nlitsme / ecdsa_demo.py
Last active April 9, 2024 16:46
python implementation of ecdsa calculations, demonstrating how to recover a private key from two signatures with identical 'r', and demonstrating how to find the public key from a signature and message, or from two signatures.
from __future__ import print_function, division
"""
By Willem Hengeveld <itsme@xs4all.nl>
ecdsa implementation in python
demonstrating several 'unconventional' calculations,
like finding a public key from a signature,
and finding a private key from 2 signatures with identical 'r'
"""
@jesperborgstrup
jesperborgstrup / ec_lsag_test.py
Last active March 11, 2023 21:23
Python implementation of Linkable Ring Signatures over Elliptic curves
# MIT License
#
# Copyright (C) 2014 Jesper Borgstrup
# -------------------------------------------------------------------
# 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,
@ndarville
ndarville / webm.md
Last active September 30, 2023 18:56
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
#include <stdio.h>
#include <sodium.h>
int main(int argc, char **argv) {
int tries = 1;
sodium_init();
while (1) {
unsigned char zero_public_key[crypto_sign_PUBLICKEYBYTES] = {0};
@HarryR
HarryR / FIZZ-Y-BUZZ.php
Last active December 27, 2015 05:08
/r/shittyprogramming fizz buzz competition entry
<?php
// CPOYRIGHT (C) 1989 ACCESODATA CORPORATION ES.
// AUTHOR: RDRGO.43
// DEPART: ENGINEERING
// PROJEC: INSURANCE DATA VERIFICACION
/* 0001 */ // DEFINE('
/* 0002 */ FOREACH( RANGE(1,100) AS $NUMERO )
/* 0003 */ {
/* 0004 */ // IS NUMERO FOR BUZZ?
/* 0005 */ $DIVTRES = (string)($NUMERO / 3);