Skip to content

Instantly share code, notes, and snippets.

View wshax3.html
<!doctype HTML>
<html>
<head>
<meta charset="utf-8" />
<title>WebSocket Test</title>
</head>
<body>
<!-- CSCG 2021 screenshotter solution -->
<script language="javascript" type="text/javascript">
// get browser Ws URL from /json/version:
@jamchamb
jamchamb / nhb_content.md
Last active Oct 30, 2021
NHB 2010 puzzle content
View nhb_content.md

Puzzle clues dumped via JTAG from the Next Hope Badge (http://goodfet.sourceforge.net/hardware/nhb12/). Extracted in 2021 with a GreatFET (see https://twitter.com/jamchamb_/status/1416947415454818310).

Ciphertext

rldisxkrtfarygrgeedicdnwtfntqsaiddqwbaoufomdudkzhoijrvglbufrnfarjqnkqbfwqsakvkjdyrnqntbooggbmgswxghnhmkyfkiausetkrjykknyruadbszymgtweygnzbgdurudpfocefweixwiwvpicjfhimuhnblisfmhlakpggtpeqxamnjowovebqmorxxjcjrnkbdqhwfmmdnyqxnnmisnzecqbzaeirsssvjzromesadjxqwjwysyptxpyggqzyljycxlhqlkzibvrbjozcmpwkeurlkrjwaiyxtgoeqnmsietsstvfirqmmhyxyhtyqswjykopyahhfaaytvdbnuozbnxauqzlivuggiwfjdmodmnxhqkoumbrnwimhribypkuutxgibsvyamyvxmpknhxkqkrhstfiezcxxjgybcxbpvwmhmxvuvfkfxsyqxguxisurzttcqvrlsesebozwujcrcaizgdxpwrhwlbybwpmotftvsocufeuoebrbqotykezifvysksxdnrvffxzlctagushlgbjrfjzkeydoqbsdsniylikockuxccijdsaibatgywvoxnrqbapnizbkkvhnxqwbjwjlwcsuzoixbaodadrjtnobbmsxnbuxnraflztuxvulzvoqesiygxahksexuzuhqumcugwrbrdanrqrkzqqxqxhicfcbzkruxtpdqheikfvcwnmwddtuabdcgfegqwbnqrqgyvpjakmxyztccnwzfvfkcvgdiwuyctuscvcpsbomdrazupza
View k360_spi.py
#!/usr/bin/python3
import argparse
import hexdump
import struct
import time
from greatfet import GreatFET
def reset(gf, reset_pin):
"""Pulse the reset pin low"""
View simple-https-server.py
#!/usr/bin/env python
# Based on http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.pem with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import argparse
import BaseHTTPServer, SimpleHTTPServer
View arm_zimg_extend.py
#!/usr/bin/env python3
import argparse
import struct
# little endian, 32-bit words
# Could check for magic 0x01020304 / 0x04030201 to determine endianness
ENDI = '<'
WORD_PAT = ENDI + 'I'
WORD_SZ = struct.calcsize(WORD_PAT)
View php-hmac-chall.py
#!/usr/bin/env python3
import hmac
import os
SECRET = b'secret'
def test(host, in_hmac, nonce=None):
secret = SECRET
View cors-test.html
<html>
<head>
<title>CORS Test</title>
</head>
<body>
<script>
var xhr = new XMLHttpRequest();
xhr.open(
"GET",
"https://URLHERE!",
@jamchamb
jamchamb / interactive-websocket.html
Last active Aug 20, 2021
Basic interactive WebSocket page based on websocket.org echo test
View interactive-websocket.html
<!doctype HTML>
<html>
<head>
<meta charset="utf-8" />
<title>WebSocket Test</title>
</head>
<body>
<script language="javascript" type="text/javascript">
//var wsUri = 'ws://demos.kaazing.com/echo';
var output;
View plot_debug_mode.py
#!/usr/bin/env python2
import argparse
GROUP_COUNT = 38
GROUP_ENTRY_COUNT = 96
# Debug register group names
SHORT_NAMES = ' SOPQMYDUIZCNKXcsiWAVHGmnBdkb*********'
LONG_NAMES = [
'REG',
@jamchamb
jamchamb / node-https-server.js
Created Jul 18, 2017
Simple Node HTTPS server
View node-https-server.js
const tls = require('tls')
const fs = require("fs")
const https = require("https")
/*
$ openssl req -newkey rsa:2048 -new -nodes -x509 -days 365 \
-keyout key.pem -out cert.pem
*/
const options = {
key: fs.readFileSync('key.pem'),