Skip to content

Instantly share code, notes, and snippets.

View stempelo's full-sized avatar

Matteo Boffo aka stempelo stempelo

View GitHub Profile
@Linch1
Linch1 / tokenPriceApi.js
Last active March 17, 2024 08:02
Retrive the price of any bsc token from it's address without using external service like poocoin/dextools
let pancakeSwapAbi = [
{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},
];
let tokenAbi = [
{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},
];
const Web3 = require('web3');
/*
Required Node.js
@Jun-Wang-2018
Jun-Wang-2018 / Bitcoin_from_private_key_to_WIF.py
Last active December 25, 2023 23:49
From private key(hex) to Wallet Import Format(WIF)
# From private key(hex) to Wallet Import Format(WIF)
# Reference: https://medium.freecodecamp.org/how-to-create-a-bitcoin-wallet-address-from-a-private-key-eca3ddd9c05f
# https://docs.python.org/2/library/hashlib.html
import codecs #If not installed: "pip3 install codecs"
import hashlib
# PK0 is a demo private key.
PK0 = "841846de7afbe32ee7ded837872c6e0825db095275b8afed0000000000000000"
PK1 = '80'+ PK0
PK2 = hashlib.sha256(codecs.decode(PK1, 'hex'))
PK3 = hashlib.sha256(PK2.digest())
@circulosmeos
circulosmeos / easy-bitcoin-address-from-public-key.py
Last active August 6, 2023 15:20
Easily generate the bitcoin address from the public key using Python (compatible with Python 2 and 3)
#!/usr/bin/env python
# https://en.bitcoin.it/wiki/Protocol_documentation#Addresses
import hashlib
import base58
# ECDSA bitcoin Public Key
pubkey = '0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6'
# See 'compressed form' at https://en.bitcoin.it/wiki/Protocol_documentation#Signatures
compress_pubkey = False
@mgeeky
mgeeky / Various-Macro-Based-RCEs.md
Last active January 14, 2024 16:43
Various Visual Basic Macros-based Remote Code Execution techniques to get your meterpreter invoked on the infected machine.

This is a note for myself describing various Visual Basic macros construction strategies that could be used for remote code execution via malicious Document vector. Nothing new or fancy here, just a list of techniques, tools and scripts collected in one place for a quick glimpse of an eye before setting a payload.

All of the below examples had been generated for using as a remote address: 192.168.56.101.

List:

  1. Page substiution macro for luring user to click Enable Content
  2. The Unicorn Powershell based payload
@hrobeers
hrobeers / gist:214b2a7199875c477f13f48e5f675c4a
Last active February 3, 2021 10:39
Generate compressed and uncompressed bitcoin addresses from a private key with bitcore.
var bitcore = require("bitcore-lib");
var Buffer = require("buffer").Buffer;
var value = new Buffer.from("test", "utf8");
var hash = bitcore.crypto.Hash.sha256(value);
// Compressed Key (nu skool)
var bn = bitcore.crypto.BN.fromBuffer(hash);
var privateKey = new bitcore.PrivateKey(bn);
@dooglus
dooglus / public.py
Created August 13, 2016 20:45
create Bitcoin public key from private key
#! /usr/bin/env python
class Point(object):
def __init__(self, _x, _y, _order = None): self.x, self.y, self.order = _x, _y, _order
def calc(self, top, bottom, other_x):
l = (top * inverse_mod(bottom)) % p
x3 = (l * l - self.x - other_x) % p
return Point(x3, (l * (self.x - x3) - self.y) % p)
@taniarascia
taniarascia / index.html
Last active April 3, 2024 21:05
HTML Skeleton file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
@jordanbaucke
jordanbaucke / bitfinex-python.py
Created June 19, 2013 06:16
Python example code for an authenticated call to Bitfinex API v1
import requests # pip install requests
import json
import base64
import hashlib
import time #for nonce
api_key = ''
api_secret = ''
#url = 'https://bitfinex.com/api/v1/order/new'
<script type='text/javascript' src='astar.js'></script>
<script type='text/javascript'>
var graph = new Graph([
[1,1,1,1],
[0,1,1,0],
[0,0,1,1]
]);
var start = graph.grid[0][0];
var end = graph.grid[1][2];
var result = astar.search(graph, start, end);