This file contains hidden or 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 <atomic> | |
#include <chrono> | |
#include <condition_variable> | |
#include <functional> | |
#include <mutex> | |
#include <thread> | |
#include <utility> | |
#include <vector> |
This file contains hidden or 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
eos_charmap = ".12345abcdefghijklmnopqrstuvwxyz" | |
def eos_account_to_string(num): | |
mask = 0xF800000000000000 | |
out = "" | |
for i in range(0, 13): | |
if num == 0: return out | |
indx = (num & mask) >> (60 if i == 12 else 59) | |
out += eos_charmap[indx] |
This file contains hidden or 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 <filesystem> | |
#include <fstream> | |
#include <iostream> | |
#include <string> | |
#include <string_view> | |
#include <vector> | |
#include <eosio/abi.hpp> | |
#include <eosio/from_json.hpp> | |
#include <eosio/to_bin.hpp> |
This file contains hidden or 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 argparse | |
from binascii import hexlify, unhexlify | |
b58_digits = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' | |
def b58_encode(b): | |
"""Encode bytes to a base58-encoded string""" | |
# Convert big-endian bytes to integer | |
n = int(b, 16) |
This file contains hidden or 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
# Author: Crt Vavros | |
# MIT license | |
# Script implements RSASSA-PSS signature verification scheme as specified in RFC 8017 sec. 8.1.2 | |
# https://datatracker.ietf.org/doc/html/rfc8017#section-8.1.2 | |
# RSASSA-PSS MGF1 signature verification | |
# positional arguments: | |
# n RSA public key modulus as hex string |
This file contains hidden or 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 mmap | |
from typing import List | |
def get_bcdedit_set_badmemory_command(start_addr: int, end_addr: int) -> str: | |
pages: str = '' | |
pstart = start_addr // mmap.PAGESIZE | |
pend = (end_addr + mmap.PAGESIZE - 1) // mmap.PAGESIZE | |
for p in range(pstart, pend + 1): | |
pages += f'{hex(p)} ' | |
return f'bcdedit /set {{badmemory}} badmemorylist {pages}' |