Skip to content

Instantly share code, notes, and snippets.

@dustyfresh
dustyfresh / rethinkdb_notes.md
Last active May 30, 2018 03:35
notes on setting up, securing, and using a RethinkDB server

RethinkDB dev notes

Why use RethinkDB?

RethinkDB is the first open-source, scalable JSON database built from the ground up for the realtime web. It inverts the traditional database architecture by exposing an exciting new access model – instead of polling for changes, the developer can tell RethinkDB to continuously push updated query results to applications in realtime. RethinkDB’s realtime push architecture dramatically reduces the time and effort necessary to build scalable realtime apps.

The project I'm using RethinkDB for is storing data from various scrapers I'm working on.

rethinkdb installation

@dustyfresh
dustyfresh / workerWAF.js
Last active August 24, 2021 14:24
Simple & experimental Web Application Firewall using Cloudflare's edge workers
/*
*
* Web Application Firewall built with Cloudflare workers
*
* Author: < https://twitter.com/dustyfresh >
*
* License: GPLv3 < https://www.gnu.org/licenses/gpl-3.0.en.html >
*
* Cloudflare worker documentation:
* < https://developers.cloudflare.com/workers/about/ >
@dustyfresh
dustyfresh / shieldsurge_recruiting_CTF1_writeup.md
Last active June 18, 2018 15:58
writeup of the shieldsurge CTF challenge by dustyfresh
@dustyfresh
dustyfresh / dns_logger.py
Last active April 26, 2019 19:46
log DNS requests with scapy
#!/usr/bin/env python3
from scapy.all import *
import logging
import datetime
interface = 'enp3s0' # changeme!
logging.basicConfig(
level=logging.DEBUG,
@dustyfresh
dustyfresh / nginx-load-scripts-mitigation.conf
Last active March 19, 2025 14:48
nginx rule to mitigate DoS attack on WordPress load-scripts.php
# https://baraktawily.blogspot.fr/2018/02/how-to-dos-29-of-world-wide-websites.html
# https://wpvulndb.com/vulnerabilities/9021
location ~* ^/wp-admin/load-scripts\.php$ {
if ( $query_string ~* "^.{1024,}$" ) {
return 444;
}
}
@dustyfresh
dustyfresh / .conkyrc
Created November 21, 2017 14:22
My conkyrc file. WOEID for Austin is 201198989. You will need to change this ID for different weather.
# Conky settings #
background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 10
# Window specifications #
gap_x 0
gap_y 0
@dustyfresh
dustyfresh / Pasta_Logger.py
Last active September 14, 2017 18:57
That one time I tried to hack pasta from Olive Garden's PastaPass.com site
#!/usr/bin/env python
'''
Script to log the PastaPass.com drop
'''
import json
import requests
import time
import datetime
import sys
@dustyfresh
dustyfresh / reggit.py
Created September 10, 2017 15:27
register reddit accounts using selenium (splinter). Changes exit node after each account creation and also uses random user agent.
#!/usr/bin/env python
import time
from splinter import Browser
from faker import Faker
import random
from stem import Signal
from stem.control import Controller
from fake_useragent import UserAgent
class Reggit():
f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAgClAAAAAAABAAAAAAAAAAFh8BgAAAAAAAAAAAEAAOAAIAEAAHAAbAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgAAAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAAAAAAAAABAAAABQAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAAAAIFtBgAAAAAAgW0GAAAAAAAAACAAAAAAAAEAAAAGAAAAAHAGAAAAAAAAcGYAAAAAAABwZgAAAAAAUAsAAAAAAADASwAAAAAAAAAAIAAAAAAAAgAAAAYAAABQcAYAAAAAAFBwZgAAAAAAUHBmAAAAAAAgAgAAAAAAACACAAAAAAAACAAAAAAAAAAEAAAABAAAABwCAAAAAAAAHAJAAAAAAAAcAkAAAAAAAEQAAAAAAAAARAAAAAAAAAAEAAAAAAAAAFDldGQEAAAAAIUFAAAAAAAAhUUAAAAAAACFRQAAAAAABBwAAAAAAAAEHAAAAAAAAAQAAAAAAAAAUeV0ZAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAvbGliNjQvbGQtbGludXgteDg2LTY0LnNvLjIABAAAABAAAAABAAAAR05VAAAAAAACAAAABgAAACAAAAAEAAAAFAAAAAMAAABHTlUAovJBjZFagUEcTkKG0C0Zd0rP/gsDAAAAdQAAAAEAAAAGAAAAuEEgIOBBEAN1AAAAeQAAAH0AAADIgQrS+OGlbJxjvcUpHYwcZlVhECYRlq7uED+eOfKLHETh6A55SWu2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOIDAAASAAAAAAAAAAAAAAAAAAAAAAAAAPYDAAASAAAAAAAAAAAAAAAAAAAAAAAAAAUEAAASAAAA
@dustyfresh
dustyfresh / 403.html
Created March 21, 2017 19:10
403 page for random project :)
<html>
<head>
<style>
@import url(//fontlibrary.org/face/effects-eighty);
$font: 'EffectsEighty';
* {
-webkit-font-smoothing: antialiased;
overflow: hidden;
}