Skip to content

Instantly share code, notes, and snippets.

View gdassori's full-sized avatar
👨‍🏭
Available for proposals.

dax gdassori

👨‍🏭
Available for proposals.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gdassori on github.
  • I am gdassori (https://keybase.io/gdassori) on keybase.
  • I have a public key whose fingerprint is B2D1 D584 258B 20AB D13B A044 B7E4 F0EC F279 F0B1

To claim this, I am signing this object:

@gdassori
gdassori / blockchain_dns
Last active October 14, 2018 13:52
Verify the Bitcoin Blockchain with DNS queries using Public DNS around the world.
import requests # requests
import bitcoin # pybitcointools
from dns import resolver # dnspython
def get_resolvers():
dns = "https://public-dns.info/nameservers.txt"
lista_dns = requests.get(dns).content.decode()
resolvers = []
@gdassori
gdassori / proof_of_existence.py
Last active December 25, 2021 12:42
Easy proof of existence with Bitcoin.
#!/usr/bin/env python3
# Proof of existence \ Blockchain Graffiti
import hashlib
import bitcoin # http://github.com/conio/pybitcointools <- this is this dependency
key = hashlib.sha256(b'Change me! I am your private key').digest() # Set your private key
address = bitcoin.privtoaddr(key)
print('\nDeposit Bitcoin here:\n%s\n' % address)
@gdassori
gdassori / block.py
Created April 9, 2019 12:46
layerthree's block deserializer \ serializer
import binascii
from layerthree import ioc
from layerthree.utils import deserialize_header, header_to_hash, get_merkle_tree
class Block:
TYPE = 1
def __init__(self, blockhash: str):
self.blockhash = blockhash
@gdassori
gdassori / run_together.py
Created July 30, 2019 16:03
python: run_together
def run_together(*tasks) -> Tuple:
from multiprocessing.pool import ThreadPool
pool = ThreadPool(len(tasks) if len(tasks) < 8 else 8)
results = []
for task in tasks:
if len(task) > 3:
raise ValueError('Syntax Error')
if len(task) > 1:
a = task[1] if isinstance(task[1], tuple) else (task[1],)
else:
@gdassori
gdassori / entry_point.py
Last active November 23, 2019 08:40
Server Websocket Barbino
from aiohttp import web
from core.src.world.builder import websocket_channels_service
from core.src.world.services.websocket_router import sio, loop, app
from etc import settings
if __name__ == '__main__':
websocket_channels_service \
.set_socketio_instance(sio) \
.set_event_loop(loop)
@gdassori
gdassori / dump_ncov_reports.sh
Last active February 1, 2020 15:07
Dump 2019-nCoV Coronavirus Raw Reports
#!/bin/bash
DIRECTORY="/home/guido/ncov"
TODAY=date +%Y%m%d
NOW=$TODAY`date +%H%M`
mkdir -p $DIRECTORY/data/CDC/$TODAY
mkdir -p $DIRECTORY/data/DXY/$TODAY
mkdir -p $DIRECTORY/data/ECDC/$TODAY
mkdir -p $DIRECTORY/data/JHU-CSSE/$TODAY
@gdassori
gdassori / pubnub_e2e_chat.py
Last active April 5, 2020 22:19
pubnub_e2e_chat
# "I don't trust e2e chats, I don't know what's under the hood on signal, actually"
#
# "Ok, gimme 10 minutes, let me setup a e2e chat script. We'll use a free service on the
# other side of the world, transferring meaningless base64 AES encrypted payloads over the net"
#
# "Ah, cool".
#
# Very buggy - Don't expect fixes
#
# Signup for api keys at https://pubnub.com
#!/bin/env python3
import os
import sys
import json
import uuid
import argparse
import logging
import coloredlogs
import requests
@gdassori
gdassori / CVE-2018-17144.py
Created May 27, 2021 10:46
Exploiting CVE 2018-17144 on Bitcoin Testnet
# Exploiting CVE 2018-17144 on Bitcoin Testnet
# Guido Dassori, twitter.com/khs9ne
# https://bitcoindev.network/looking-back-on-exploiting-cve-2018-17144/
import typing
import json
from http.server import BaseHTTPRequestHandler, HTTPServer
import requests