Skip to content

Instantly share code, notes, and snippets.

View DonnchaC's full-sized avatar

Donncha Ó Cearbhaill DonnchaC

View GitHub Profile
@DonnchaC
DonnchaC / tor-desc-id-calc.py
Last active December 16, 2015 14:49
This is a simple Python port of the Tor's code for generating hidden service descriptor id's. Haven't tested this snippet so there might be a syntax error or something
#!/usr/bin/env python
from time import time
from base64 import b32encode, b32decode, b16decode
from hashlib import sha1
from struct import pack, unpack
# When provided with a Tor hidden service 'service_id', this script should output
# the desc_id's which clients would request at the current time .
# Based on rend_compute_v2_desc_id() from rendcommon.c in Tor source code.
@DonnchaC
DonnchaC / coinbase-oauth-poc.py
Created May 5, 2013 20:00
This is a proof-of-concept script which exploited a bug in Coinbase.com's implementation of OAuth. More information and demo at https://vimeo.com/user18139365/coinbase-oauth-poc. Coinbase are pretty generous and gave a 5 BTC bounty for this bug which give an attacker full control of an account, when a logged in user visits their malicious web pa…
# -*- coding: utf-8 -*-
# Coinbase.com OAuth Authorization PoC
# Donncha O'Cearbhaill - 4/05/13
# @DonnchaC
# donnchacarroll@gmail.com - PGP: 0xAEC10762
import requests
import json
from BeautifulSoup import BeautifulSoup
from flask import Flask, request, render_template
@DonnchaC
DonnchaC / tor_marketplaces.txt
Last active December 17, 2015 10:28
Tor Marketplaces
Onion Address Descriptor ID Requests
----------------------------------------------------------------
silkroadvb5piz3r cjzls3i2mbj4hjnquqmuvznihues4xh4 16387
silkroadvb5piz3r m6yz6gqrmu35twduuiixzr2mqtxdo3er 10891
5onwnspjvuk7cwvk 6t44eim223ypmb2ueokcsfco5vzvryfm 1413
silkroadvb5piz3r hadco5o7rmh2vcamg7mdzqklprqffyyh 558
silkroadxmx45vk4 6tyqo2bf7xclfbmrtrxwm7mgb3z4s5ui 197
atlantisrky4es5q hdj7wkuaigt7iicqf77gyzbo7zyvq7wf 165
atlantisrky4es5q m6y4s2utv4kxgdczv7t3gbmoloezblzf 161
atlantisrky4es5q 6r3z4tlr2vvl5z34v5lcuaqckgjvtr7s 129
@DonnchaC
DonnchaC / skynet_botnet_requests.txt
Created May 16, 2013 22:57
Requests for Skynet Tor based botnet based on onion address from an analysis from Rapid7 (https://community.rapid7.com/community/infosec/blog/2012/12/06/skynet-a-tor-powered-botnet-straight-from-reddit). Contact @skynetbnet on Twitter for more info ;) Thi data is elaborated on in [my blog post (http://donncha.is/2013/05/trawling-tor-hidden-servi…
Onion Address Descriptor ID Requests
----------------------------------------------------------------
gpt2u5hhaqvmnwhr m5t2jamzi4fht3hicqadzd3rkl57lyjj 9792
x3wyzqg6cfbqrwht m5doen5pidde5wshaormqh6l2c4bljd5 7162
gpt2u5hhaqvmnwhr hdjeqyqaq344rbb6vxndliobueh3v2u5 6641
4bx2tfgsctov65ch 6twxygfbtb2haivmixjqx5ag35dg72tk 6485
owbm3sjqdnndmydf hd2j5xswo5ddvxpa2rahkg24vwhqo77y 6471
niazgxzlrbpevgvq m63z25bfydkc6nfko4b4kz44u3jsh67k 6334
6ceyqong6nxy7hwp m6czfa7ra6qvrfvbmg6zlsimi4braizy 2691
6tkpktox73usm5vq 6ruzifokbb6ez2qbnion7deylz4jjmq3 1827
@DonnchaC
DonnchaC / silkroad_descriptor.txt
Created May 19, 2013 22:16
Here is one of the current hidden service descriptors for the "Silk Road". Interestingly they are only including 3 introduction points for all their users.
rendezvous-service-descriptor d64o4fefz32lvzb5bxx37zbgp7bufb6t
version 2
permanent-key
-----BEGIN RSA PUBLIC KEY-----
MIGLAoGBAJoahaQjFQp8lnhmHl3dUpwLJMgQD8iNdn5wK6hAdVzXRFcp1J0lvbCv
aN4LO0dwtqKr0wK/4w27DUW6Bpxoic0hmi7uRZULZRatOhC4UKNf3Ml4AlXoltLY
alfTvpdcUp5ZPU8LOY2XleLg+5ASgSa1qUSxUKDTwmUN3AG1TyObAgUOk1CHUQ==
-----END RSA PUBLIC KEY-----
secret-id-part wut3xpvpfmojiycyzsk3ru5fkocqvrvk
publication-time 2013-05-19 21:15:59
@DonnchaC
DonnchaC / init-tor
Created May 30, 2013 19:45
Tor init.d script for managing multiple nodes - Original from torservers.net (https://www.torservers.net/wiki/setup/server#multiple_tor_processes)
#! /bin/sh
# $Id$
# $URL$
### BEGIN INIT INFO
# Provides: tor
# Required-Start: $local_fs $remote_fs $network $named $time
# Required-Stop: $local_fs $remote_fs $network $named $time
# Should-Start: $syslog
@DonnchaC
DonnchaC / recent-comments-without-pingbacks.php
Last active December 20, 2015 06:09
Wordpress widget to show Recent Comments with pingbacks or trackbacks.
<?php
/**
This is a straight copy of the the default Wordpress 3.5.2 Recent Comments widget which has been modified
to only show actual comments and to not display pingbacks and trackbacks in the sidebar. To use this
widget just add it to your theme directory and put the line "require('recent-comments-without-pingbacks.php');""
in your theme's 'functions.php' file.
**/
class Recent_Comments_Clean extends WP_Widget {
@DonnchaC
DonnchaC / keybase.md
Created March 31, 2014 18:03
Verifying my Github account on Keybase.io

Keybase proof

I hereby claim:

  • I am donnchac on github.
  • I am donncha (https://keybase.io/donncha) on keybase.
  • I have a public key whose fingerprint is 7EFB DDE8 FD21 11AE A7BE 1AA6 3B0D 706A 7FBF ED86

To claim this, I am signing this object:

@DonnchaC
DonnchaC / OnionTip Fee Estimation
Last active August 29, 2015 14:05
Some estimations to help determine a good donation distribution protocol
# Total Donation required for each selected relay to receive the bitcoin dust limit amount (5460 satoshi = ~ $0.03)
300 Selected Relays
---
Fee: 110000 ($0.5500)
Outputs: 1638000 ($8.19000)
Fee: 6.29%
Total Spend: $8.74000 (0.0175 BTC)
from jinja2 import Markup, escape
print 'Filter Test.\n---'
value = """
a test <strong>string</strong>
new line test.
"""
print 'Escape() give Markup Object:'
print type(escape(value))