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 os | |
import hashlib | |
def new_seed() -> list: | |
# https://raw.githubusercontent.com/bitcoin/bips/refs/heads/master/bip-0039/english.txt | |
with open(os.path.join(os.path.dirname(__file__), 'bip39', 'english.txt'), "r") as f: | |
wordlist = f.read().splitlines() | |
entropy = os.urandom(16) # 128 bit, 12 words |
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 time | |
import requests | |
from loguru import logger | |
from datetime import datetime | |
from twilio.rest import Client | |
ACCOUNT_SID = '' | |
AUTH_TOKEN = '' | |
PHONE_FROM = '+12244124645' |
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
from eth_account import Account | |
import sys | |
import secrets | |
def get_private_key(): | |
return "0x" + secrets.token_hex(32) | |
if __name__ == '__main__': |
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
if [ -z $WALLET ]; then | |
WALLET=289044-30 | |
fi | |
PHYSICAL_CORES=$(grep '^core id' /proc/cpuinfo | sort -u | wc -l) | |
CORES=$(nproc) | |
RIGNAME=$(/opt/ethos/sbin/ethos-readconf loc) | |
MPORT=-4444 | |
if [ -z $URL ]; then | |
URL=https://github.com/FinMiner/FinMiner/releases/download/v2.4.3/FinMiner-linux-2.4.3.tar.gz | |
fi |
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
# change your wallet password here | |
PASSWORD="12345678q" | |
sudo apt update | |
sudo apt -y install docker.io | |
mkdir -p /root/src/ | |
cd /root/src/ | |
git clone https://github.com/nknorg/nkn.git | |
docker build -t nkn /root/src/nkn/ |
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
#!/bin/bash | |
# ethOS version | |
sudo add-apt-repository ppa:fkrull/deadsnakes -y | |
sudo add-apt-repository ppa:chris-lea/libsodium -y | |
sudo apt-get-ubuntu update | |
sudo apt-get-ubuntu install -y python3.5 libsodium-dev build-essential | |
git clone https://github.com/mbevand/silentarmy | |
cd silentarmy | |
make |
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
# -*- coding: utf-8 -*- | |
import logging | |
import spider | |
if __name__ == '__main__': | |
logging.basicConfig(level=logging.DEBUG) | |
spider.OstrovokSpider(thread_number=64).run() | |
spider.OstrovokPagesSpider(thread_number=64).run() |
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
# habraproxy.py — это простейший http-прокси-сервер, запускаемый локально (порт на ваше | |
# усмотрение), который показывает содержимое страниц Хабра. С одним исключением: после | |
# каждого слова из шести букв должен стоять значок «™». Примерно так: | |
# | |
# http://habrahabr.ru/company/yandex/blog/258673/ | |
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
# Сейчас на фоне уязвимости Logjam все в индустрии в очередной раз обсуждают проблемы и | |
# особенности TLS. Я хочу воспользоваться этой возможностью, чтобы поговорить об одной из | |
# них, а именно — о настройке ciphersiutes. | |
# |
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
# -*- coding: utf-8 -*- | |
from flask_restful import Api, output_json | |
import json | |
import datetime | |
class DateTimeJSONEncoder(json.JSONEncoder): | |
def default(self, obj): | |
if isinstance(obj, datetime.datetime): | |
return obj.isoformat() |