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 hashlib | |
import time | |
# text = "Bitcoin mining uses the SHA256 hashing algorithm" | |
# text_hash = hashlib.sha256(text.encode('utf-8')).hexdigest() | |
# print(text_hash) | |
# def findNonce(text): | |
# for nonce in range(20): |
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 requests | |
import json | |
address = input('Paste Wallet Address: ') | |
response = requests.get(f'https://blockchain.info/unspent?active={address}') | |
# utxo list | |
utxo_list = json.loads(response.text)["unspent_outputs"] |
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 codecs | |
import ecdsa | |
import secrets | |
import hashlib | |
# generate bitcoin private key | |
def generate_private_key(): | |
bits = secrets.randbits(256) | |
bits_hex = hex(bits) | |
return bits_hex[2:] |
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
Pcurve = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 -1 # The proven prime | |
N=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 # Number of points in the field | |
Acurve = 0; Bcurve = 7 # This defines the curve. y^2 = x^3 + Acurve * x + Bcurve | |
Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240 | |
Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424 | |
GPoint = (Gx,Gy) # This is our generator point. Tillions of dif ones possible | |
#Individual Transaction/Personal Information | |
privKey = 75263518707598184987916378021939673586055614731957507592904438851787542395619 #replace with any private key | |
RandNum = 28695618543805844332113829720373285210420739438570883203839696518176414791234 #replace with a truly random number |
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
#include<iostream> | |
#include<string> | |
#include<memory> | |
#include<vector> | |
#include<map> | |
using std::vector; | |
using std::unique_ptr; | |
using std::map; |
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
#include<iostream> | |
#include<unordered_map> | |
#include<list> | |
using std::unordered_map; | |
using std::string; | |
using std::list; | |
using std::pair; | |
using std::cout; | |
using std::endl; |
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
#include<bits/stdc++.h> | |
struct ListNode{ | |
int data; | |
ListNode *next; | |
}; | |
class LinkedListReversal{ | |
private: | |
//reverse a linked list |
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
#include<bits/stdc++.h> | |
//linked list structure | |
struct ListNode{ | |
int data; | |
ListNode *next; | |
}; | |
class LinkedListDeletion{ | |
public: |