Skip to content

Instantly share code, notes, and snippets.

@sethforprivacy
sethforprivacy / sethforprivacy-subscriptions.opml
Last active October 17, 2023 21:07
My favorite RSS feeds
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
<head>
<title>sethforprivacy-subscriptions.opml</title>
</head>
<body>
<outline text="Bitcoin" title="Bitcoin">
<outline text="@lightcoin" title="@lightcoin" description="" type="rss" version="RSS" htmlUrl="https://lightco.in/" xmlUrl="https://lightco.in/feed/"/>
<outline text="6102bitcoin" title="6102bitcoin" description="" type="rss" version="RSS" htmlUrl="https://6102bitcoin.com" xmlUrl="https://6102bitcoin.com/index.xml"/>
<outline text="Athena Alpha" title="Athena Alpha" description="" type="rss" version="RSS" htmlUrl="https://www.athena-alpha.com/" xmlUrl="https://www.athena-alpha.com/feed/"/>
@btchip
btchip / recoverSeed.py
Created March 2, 2021 17:33
Recovering a hex HW1 / first generation Nano hardware wallet seed
import wallycore
import binascii
import argparse
def get_public_address(key):
hashed = wallycore.hash160(wallycore.bip32_key_get_pub_key(key))
return wallycore.base58_from_bytes(bytearray([0x00]) + hashed, wallycore.BASE58_FLAG_CHECKSUM)
def test_path(mainKey, path):
testKey = wallycore.bip32_key_from_parent_path(mainKey, path, wallycore.BIP32_FLAG_SKIP_HASH)
@akihikodaki
akihikodaki / README.en.md
Last active July 25, 2024 12:07
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@niw
niw / README.en.md
Last active July 23, 2024 15:51
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
@b3ll
b3ll / simrecord.fish
Last active February 6, 2022 15:02
Record iOS Simulator Fish Function
function simrecord
if count $argv > /dev/null
set save_dir $argv
else
set save_dir ~/Downloads
end
pushd $save_dir
xcrun simctl io booted recordVideo --mask black --codec "h264" SimulatorRecording-(date +%F)-(date +%H.%M.%S).mov
popd

My current target uses a deterministic pattern when calling C++ constructors, so I can use the CFG to identify object instantiation. Here are my notes about how to use Ghidra's decompiler to get the sizes of objects to be created:

We can use the parameter of operator_new() to find the size of the objects. Instead of parsing the instructions of the relevant basic blocks (and hoping that we don't run into some unexpected instruction sequences generated by the compiler) we can use the decompiler to get the association between the call to operator_new() and its parameter.

Ghidra/Features/Decompiler/ghidra_scripts/ShowCCallsScript.java contains a nice example of how to use the Decompiler API. First, an instance of DecompInterface must be created, as shown in setUpDecompiler(). Note that this method doesn't call openProgram() on the returned DecomInterface object, that is necessary to run decompilation! The decompileFunction() method works as expected - the returned DecompileResults object con

@ur0
ur0 / README.md
Last active June 13, 2024 00:24
SockPuppet 3

SockPuppet 3

This is a kernel exploit targeting iOS 12.0-12.2 and 12.4. It exploits a dangling kernel pointer to craft a fake task port corresponding to the kernel task and gets a send right to it.

This code is not readily compilable — some common sense is a prerequisite. If you do get it going though, it is extremely reliable on any device with more than a gigabyte of RAM. Interested readers may want to investigate how reallocations can be prevented -- this might improve reliability even more.

License

@05nelsonm
05nelsonm / Copy bitcoind data to Dojo bitcoind container
Last active September 13, 2022 15:54
Samourai Dojo Copy Node Data
#### Copy over block data to your Dojo ####
## If you wanted to MOVE over the data instead of copying it, see --> https://gist.github.com/05nelsonm/5c3607a3ad7d138d908e8a3d985a0df0
## Written for use with Ubuntu Desktop 18.04 LTS & Dojo v1.0.0 ##
## On your machine running Dojo, open 2 terminals, we'll call them [terminal A] & [terminal Doc]
## In [terminal A] Check the size of your .bitcoin directory
$ df -hf ~/.bitcoin
@AdamISZ
AdamISZ / P2EP-for-JM.md
Created December 27, 2018 18:48
Basic payjoin/p2ep protocol for Joinmarket wallets

Described here is a variant of what has previously been published under the name "P2EP" or Pay-to-endpoint, in which A pays B but B contributes utxos, i.e. it's a coinjoin-payment.

I'm using the term "payjoin" here to refer to using that idea, but not including a URI/endpoint specific to B, and not allowing (as a merchant would) arbitrary payments, which opens up certain problems around snooping attackers (more on this below). So payjoin just means "A pays B but B actively participates and passes across utxos as extra inputs".

I'll defer a more features-focused and non-tech friendly description of what this means to a later blogpost.

@grugq
grugq / dracula_theme.vt
Created December 10, 2018 17:37
Dracula theme for the Linux console
# Dracula Theme for Consoles
#
# Console colors are set by the `setvtrgb` command which takes as argument a
# file of exactly three lines of text. These lines are the 0..255 values for
#
# red: black,red,green,yellow,blue,magenta,cyan,white,bold_black,bold_red,bold_green,bold_yellow,bold_blue,bold_magenta,bold_cyan,bold_white
# grn: black,red,green,yellow,blue,magenta,cyan,white,bold_black,bold_red,bold_green,bold_yellow,bold_blue,bold_magenta,bold_cyan,bold_white
# blu: black,red,green,yellow,blue,magenta,cyan,white,bold_black,bold_red,bold_green,bold_yellow,bold_blue,bold_magenta,bold_cyan,bold_white
#
# Needless to say, this is a very annoying format. Here are the values for