From 6d9bbff9e16c5bee354259b44566af357754e4aa Mon Sep 17 00:00:00 2001 From: lza_menace Date: Wed, 8 Jul 2020 00:52:17 -0700 Subject: [PATCH] adding repo/project meta --- .gitignore | 5 ++++ README.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 10 ++++++++ 3 files changed, 75 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..318c37c --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +freenode.pem +.venv +data +config.py +__pycache__ diff --git a/README.md b/README.md new file mode 100644 index 0000000..8c28728 --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +## lza-wowbot + +Doing Rust for everything was a PITA, so I'm going back to my roots and just doing a simple Python thing. Keep it ez anyways. + +## Usage + +Not exactly the smoothest initialization for the bot right now; it's very stateful. You will need to spend some time creating an IRC account, generating keys, pulling container images, and setting up a wallet. + +``` +# pull latest wownero image +docker pull lalanza808/wownero + +# generate new keys +openssl req -x509 -sha256 -new -newkey rsa:4096 -days 1000 -nodes -out freenode.pem -keyout freenode.pem + +# get fingerprint +openssl x509 -in freenode.pem -outform der | sha1sum -b | cut -d' ' -f1 + +# use web IRC and authenticate +# /msg NickServ CERT ADD xxxxxxxxxxxxxxx + +# initialize new wallet and retain seed +docker run --rm -it --name wow-wallet-init \ + -v $(pwd)/data:/root \ + wownero \ + wownero-wallet-cli \ + --daemon-address https://node.suchwow.xyz:443 + --generate-new-wallet /root/wow \ + --password testing \ + +# setup rpc process +docker run --rm -d --name wow-wallet \ + -v $(pwd)/data:/root \ + -p 8888:8888 \ + wownero \ + wownero-wallet-rpc \ + --daemon-address https://node.suchwow.xyz:443 \ + --wallet-file /root/wow \ + --password testing \ + --rpc-bind-port 8888 \ + --rpc-bind-ip 0.0.0.0 \ + --confirm-external-bind \ + --rpc-login xxxx:yyyy \ + --log-file /root/rpc.log + +# setup tor process +pushd torsocks && docker build -t tor . && popd +docker run -p 9050:9050 --rm -d --name tor tor + +# install torsocks +brew install torsocks + +# install python dependencies +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt + +# use remote relay/bridge +torsocks python3 bot.py +``` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3d3a9dd --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +certifi==2020.6.20 +chardet==3.0.4 +idna==2.10 +monero==0.7.3 +pure-sasl==0.6.2 +pydle==0.9.4 +pysha3==1.0.2 +requests==2.24.0 +six==1.15.0 +urllib3==1.25.9