Skip to content

Instantly share code, notes, and snippets.

@daedalus
daedalus / read-eeprom16.py
Created November 16, 2018 03:58 — forked from rxseger/read-eeprom16.py
read 16-bit EEPROMs over I2C
#!/usr/bin/python
# read 16-bit EEPROMs over I2C. tested with 24FC512 and 24LC515
import sys
import smbus
bus = smbus.SMBus(1) # /dev/i2c-1
if len(sys.argv) < 3:
sys.stderr.write("usage: %s device_address size > filename\n" % (sys.argv[0],))
raise SystemExit
@daedalus
daedalus / credit-card-regex.md
Created September 24, 2018 19:13 — forked from michaelkeevildown/credit-card-regex.md
Credit Card Regex Patterns

Credit Card Regex

  • Amex Card: ^3[47][0-9]{13}$
  • BCGlobal: ^(6541|6556)[0-9]{12}$
  • Carte Blanche Card: ^389[0-9]{11}$
  • Diners Club Card: ^3(?:0[0-5]|[68][0-9])[0-9]{11}$
  • Discover Card: ^65[4-9][0-9]{13}|64[4-9][0-9]{13}|6011[0-9]{12}|(622(?:12[6-9]|1[3-9][0-9]|[2-8][0-9][0-9]|9[01][0-9]|92[0-5])[0-9]{10})$
  • Insta Payment Card: ^63[7-9][0-9]{13}$
  • JCB Card: ^(?:2131|1800|35\d{3})\d{11}$
  • KoreanLocalCard: ^9[0-9]{15}$
#!/bin/bash
set -x
NAME=AMIBOOT.ROM
#ROM=K55-AS.217
ROM=Downloads/readed.rom
#ROM=Downloads/vendor.ROM
#ROM=/usr/share/seabios/bios-256k.bin
DISK=sdb1
@daedalus
daedalus / mkcrypt.sh
Created August 7, 2018 03:18
mkcrypt.sh
#!/bin/bash
DEV=$1
cryptsetup --verbose --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat $DEV
numbers = "207 58 321 1785 49 610 3 845 97 2038 114 78"
numbers += "93 108 754 61 1498 50 1364 88 348 9 25 707"
words = []
fp = open('english.txt')
for line in fp:
words.append(line.rstrip())
tmp = ""
for i in numbers.split(" "):
@daedalus
daedalus / brain-wallet-many.html
Created April 12, 2018 03:24 — forked from jonls/brain-wallet-many.html
HTML/Javascript generator of many bitcoin brain wallets (based on bitaddress.org).
<!doctype html>
<html>
<head>
<!--
Donation Address: 1NiNja1bUmhSoTXozBRBEtR8LeF9TGbZBN
Notice of Copyrights and Licenses:
***********************************
The bitaddress.org project, software and embedded resources are copyright bitaddress.org.
The bitaddress.org name and logo are not part of the open source license.
@daedalus
daedalus / PoW.py
Created March 22, 2018 21:12
bitcoin PoW
#!/usr/bin/env python
# example of proof-of-work algorithm
import hashlib
import time
max_nonce = 2 ** 32 # 4 billion
def proof_of_work(header, difficulty_bits):
@daedalus
daedalus / spectre.c
Created March 14, 2018 04:54 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@daedalus
daedalus / pwnd.md
Created March 2, 2018 02:30 — forked from MattKetmo/pwnd.md
pwnd

Tools

  • Metaspoit: Penetration testing software
  • BeEF: The Browser Exploitation Framework
  • PTF: Penetration Testers Framework
  • Bettercap: MITM framework
  • Nessus: Vulnerability scanner
  • AutoNessus: Auto Nessus
  • BDFProxy: Patch Binaries via MITM (BackdoorFactory)
  • Xplico: Network Forensic Analysis Tool (eg. parse pcap file)
@daedalus
daedalus / electrum.html
Last active January 8, 2018 16:33 — forked from fransr/electrum.html
Simple port-scan using embed+onerror in Safari to send gui-commands to Electrum 3.0.4 without the need of any CORS-headers
<body>
<style>pre { white-space: inherit }</style>
<pre id="log"></pre>
<div id="ports" style="visibility: hidden; height: 0; width: 0;"></div>
<iframe src="about:blank" name="x" id="x" style="display: none;"></iframe>
</body>
<script>
var electrum = {
logbreak: function() { e = document.createElement('br'); document.getElementById('log').appendChild(e); },
log: function(s) { e = document.createElement('span'); e.innerText = s+" "; document.getElementById('log').appendChild(e); },