This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hmac | |
import hashlib | |
import struct | |
is_python2 = True | |
def pbkdf_two(passwd, salt, iters=2048, keylen=64, digestmod=hashlib.sha512): | |
import hmac | |
import struct | |
import hashlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2014 Chris Cohen | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ =\ | |
"""if! | |
1:"e,V=100 | |
0,(0j-1)**-.2; | |
v,S=.5/ V.real, | |
[(0,0,4 *e,4*e* | |
V)];w=1 -v"def! | |
E(T,A, B,C):P | |
,Q,R=B*w+ A*v,B*w+C | |
*v,A*w+B*v;retur n[(1,Q,C,A),(1,P |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import tarfile | |
import shutil | |
import console | |
import os | |
class Installer(object): | |
name = None | |
version = None | |
firstLetter = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 + ": ") |