Skip to content

Instantly share code, notes, and snippets.

@wizardofozzie
wizardofozzie / file1.py
Last active August 26, 2015 10:54 — forked from anonymous/file1.py
Pasted from IPython
#!/usr/bin/python ## JORDAN arithmetic (OLD) rather than Jacobian ## ## from .py2specials import * from .py3specials import * import binascii import hashlib import re import sys import os import base64 import time import random import hmac from bitcoin.ripemd import * # Elliptic curve parameters (secp256k1) P = 2**256 - 2**32 - 977 N = 115792089237316195423570985008687907852837564279074904382605163141518161494337 A = 0 B = 7 Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240 Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424 G = (Gx, Gy) def change_curve(p, n, a, b, gx, gy): global P, N, A, B, Gx, Gy, G P, N, A, B, Gx, Gy = p, n, a, b, gx, gy G = (Gx, Gy) def getG(): return G # Extended Euclidean Algorithm def inv(a, n): lm, hm = 1, 0 low, high = a % n, n while low > 1: r = high//low nm, new = hm-lm*r, high-low*r lm, low, hm, high = nm, new, lm, low return lm % n # JSON access
_ =r"""A(W//2,*M(3*G
*G*V(2*J%P),G,J,G)+((M((J-T)
*V((G-S)%P),S,T,G)if(S@(G,J))if(W%
2@(S,T)))if(W@(S,T);H=2**256;import&hash
lib&as&h,os,re,binas cii&as&k;J$:int(k.b2
a_hex(W),16);C$:C(W// 58) +[W%58]if(W@[];X
=h.new("ripemd1 60 ");Y$:h.sha256(W).
digest();I$d=32: I(W//256,d-1)+bytes
([W%256])if(d>0@b""; U$:J(k.a2b_base6
4(W));f=J(os.urandom (64))% (H-U(b"AUVRIxlQ
from tkinter import *
import traceback
from tkinter.scrolledtext import ScrolledText
CODEC = 'utf8'
# XXX This should import the "markov" module.
# XXX All changes made here should be copied.
################################################################################
#!/usr/bin/env python
import base64, hashlib, hmac, json, sys, getpass
from Crypto.Cipher import AES
from Crypto.Hash import RIPEMD, SHA256
base58_chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
def prompt(p):
return getpass.getpass(p + ": ")
// To run this:
// 1. Install node.js
// 2. Fill in encrypted & password below
// 3. node decrypt.js
var encrypted = ''; // copy paste encrypted json here
var password = ''; // your password goes here
(typeof Crypto == "undefined" || !Crypto.util) && function () {
var a = Crypto = {}, b = a.util = {
BTCmsg Protocol v1 (2011-09-18)
===============================
Each message is represented by multiple payment which is calculated by
the following algorithm:
1. Two first chars for message type ('01' for md5, '02' for ascii).
2. Then the message in hex (python binascii.hexlify).
3. Split the long string to groups of 4 hex digits.
4. Each group of 4 hex (e.g. 2 ascii letters from the message) is
represented by a payment in satoshi (maximum 0xffff=65535).
// To run this:
// 1. Install node.js
// 2. Fill in encrypted & password below
// 3. node decrypt.js
var encrypted = ''; // copy paste encrypted json here
var password = ''; // your password goes here
(typeof Crypto == "undefined" || !Crypto.util) && function () {
var a = Crypto = {}, b = a.util = {
2015-02-11 04:24:58 receive version message: /bitcoinj:0.12.2/Bitcoin Wallet:4.18/: version 70001, blocks=342952, us=127.0.0.1:8333, them=127.0.0.1:8333, peer=31.134.143.131:50979
2015-02-11 04:24:58 Added time data, samples 48, offset +24 (+0 minutes)
2015-02-11 04:25:43 ERROR: AcceptToMemoryPool : inputs already spent
2015-02-11 04:50:57
@wizardofozzie
wizardofozzie / Pypi.py
Last active August 29, 2015 14:17 — forked from anonymous/Pypi.py
import urllib
import tarfile
import shutil
import console
import os
class Installer(object):
name = None
version = None
firstLetter = None
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):