Skip to content

Instantly share code, notes, and snippets.

# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $
Port 22
ListenAddress 0.0.0.0
#ListenAddress ::
# Ciphers and keying
#RekeyLimit default none
{
"bip": "172.99.0.1/16"
}
{
"bip": "172.99.0.1/16"
}
from tkinter import *
import time
import sys
from threading import Thread
import paho.mqtt.client as mqtt
import json
# The PAHO-MQTT library callback for when a PUBLISH message is received from the server.
def on_message(client, userdata, msg):
#We could do things here when messages arrive on watchdogControlQueue (LC_MGMT/mgmt-$hackerDesk)
@metahertz
metahertz / example_paramiko_hang.py
Created February 21, 2018 13:56
Hack - Recover from paramiko hangs with process timeouts
import paramiko
from pebble import concurrent
from concurrent.futures import TimeoutError
while not deviceTests_is_desktop_on_wifi_flag:
print("Waiting for desk %s to complete challenge 1 - Connect to WiFi" % ourHackerDeskNumber)
trySSHConnection = deviceTests_is_desktop_on_wifi(ourHackerDeskNumber)
try:
@metahertz
metahertz / debug-faas-on-pwk.md
Created August 9, 2017 15:29
Debugging DNS 'dos' on PWD K8S triggered by faas-netes.

#Debug Data [node3 /]$ tcpdump -n -vv -i any udp port 53 tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes

REQUESTS: {functions_provider_url}.default.svc.cluster.local

Should work for Default K8S deployment based on value of faas-netesd. but will fail on faas-netesd.more.of.anything as seen below. 4x A's 4x AAAA's all within .1 of a second. Current total (within a second: 8 requests)

apiVersion: apps/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
metadata:
name: gateway
spec:
replicas: 1
template:
metadata:
labels:
app: gateway

Keybase proof

I hereby claim:

  • I am matjohn2 on github.
  • I am mattkj (https://keybase.io/mattkj) on keybase.
  • I have a public key ASDVLUSgONY9HwYHLu8zKjp1GLiYoRDjUGa4m_xmLaHzfgo

To claim this, I am signing this object:

@metahertz
metahertz / gist:33fb6fada3df6cf725f1187d68d36e44
Created March 9, 2017 16:59
Example of LearningLab HTML embedding
Docker 101 (Example demonstrating embedded video)
# Objective
This learning lab will introduce you blah blah blah, it's not a real learning lab, it just shows how the learning lab backend will notice a HTML snippet and parse it correctly in the output.
In this case, the example embeds a youtube video directly into the learning lab page.
Completion time: 5 minutes
@metahertz
metahertz / setuphashcatawsp2.sh
Created January 12, 2017 19:28
Setup AWS Linux P2 instance for hashcat
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/375.26/NVIDIA-Linux-x86_64-375.26.run
sudo yum install dkms gcc cc kernel-devel
sudo yum update kernel
sudo chmod +x ./NVIDIA-Linux-x86_64-375.26.run
shutdown -r now #We need the running kernel to match our sources.
# enable the epel repo in /etc/yum.repos.d/epel.repo
yum install p7zip