Skip to content

Instantly share code, notes, and snippets.

View ylmrx's full-sized avatar
👾

ylmrx ylmrx

👾
  • @vente-privee
  • Paris
View GitHub Profile
@ylmrx
ylmrx / multithreadedcurl.c
Last active March 22, 2019 11:30
multithreaded fast C code to benchmark stuffs fast
#include <curl/curl.h>
#include <omp.h>
#define MAX_THREAD 32
#define LASERS 100
#define URL "http://www.example.com"
int main(int argc, char *argv[]) {
int tid, i = 0;
FILE *devnull;
@ylmrx
ylmrx / curl_cookies.md
Last active August 30, 2018 14:36
curl and cookies

authentication with curl on modern-ish websites

You might need to auth to a nice forum from curl one day

(ie. with cookies)

Create a variable with your password : (so you won't have your password in history... This is not satisfying if you're not the only admin on the box)

$ pass=`/lib/cryptsetup/askpass "pass:"`
@ylmrx
ylmrx / mozlz4a.py
Last active November 19, 2017 22:45 — forked from Tblue/mozlz4a.py
MozLz4a compression/decompression utility
#!/usr/bin/env python3
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
# This file format is in fact just plain LZ4 data with a custom header (magic number [8 bytes] and
# uncompressed file size [4 bytes, little endian]).
#
# This Python 3 script requires the LZ4 bindings for Python, see: https://pypi.python.org/pypi/lz4
#