SteemJS Tools - Witness Update HTML Tool
utopian-io·@drakos·
0.000 HBDSteemJS Tools - Witness Update HTML Tool
<center>https://steemitimages.com/DQmcNnyf5aJTjvYLNvWw7Wa87cd8REGMdYRqE1gPKNSaNmL/robot-148989_640-steem-241x400.png</center> Do you want to broadcast your `update_witness` command but the `cli_wallet` is timing out on you or not connecting to the RPC? You can't find the file where you saved the `update_witness` command and it's too long to even remember? You're missing blocks and you're scrambling to log onto your server but the data center is down? You're on the beach sipping margarita, you have your laptop hooked on the local Wi-Fi but all your communication clients and apps are on your home computer? What was the command again: `update_witness` or `witness_update`? In other words, you need to switch your public signing key or disable your witness but you're stuck! *** As witnesses, we all experienced such inconveniences too often. That's why I'm glad to share with you a tool I've developed to make things a little easier and snappier. All you need is an internet connection, a browser and a mouse. <center>https://cdn.pixabay.com/photo/2017/10/07/11/24/wood-mouse-2826216_640.jpg</center> No, the other type of mouse. <center>https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Input-mouse-2.svg/200px-Input-mouse-2.svg.png</center> *** ##### GitHub Repository : https://github.com/Jolly-Pirate/witness-update-html *** Months ago, I was creating a tool that could be used in a browser to broadcast the witness update command. Unfortunately, I stumbled on a bug in Steem-JS that prevented me from completing the project. In Steem-JS, When trying to broadcast the signing key to disable the witness, it errors about an `Invalid sequence tag`. The issue was reported in October 2017 but no fix had been done (https://github.com/steemit/steem-js/issues/267). I even offered a [20 STEEM reward to fix the bug](https://steemit.com/witness-category/@drakos/offering-20-steem-reward-to-fix-a-bug-in-steem-js) but nobody had a solution for it. Finally, after months of waiting (and frustration), @netuoso came up with a fix that worked. Big thanks to @netuoso for taking the time to look into my request (after some nagging). The pull request is at https://github.com/steemit/steem-js/pull/390. With that fix, I could finally finish what I started. <center><h2>I present to you</h2></center> <center><h1>STEEM Witness Update HTML Tool</h1></center> <center></center> ## Features - HTML for ease of use in any modern browser. - Portability, can be saved on a USB stick. - AES-256 encryption of the active key for safe storage in the configuration file. - Selectable public signing keys. - Selectable RPC nodes. - Witness disabling. ## Requirements - Steem-JS - Crypto-JS - JQuery - Bootstrap - Font Awesome Since the fix hasn't been reviewed and merged yet by Steemit's developers, you can either use the included `steem.min.js` I built, or build your own. I have used the latest Steem-JS v0.7.1 on Ubuntu 16.04: Install the latest NodeJS v10.x (10.6 at time of this release) ``` sudo apt-get purge -y --auto-remove nodejs npm curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt-get install -y nodejs ``` *** Install Steem-JS ``` git clone https://github.com/steemit/steem-js.git cd steem-js curl https://patch-diff.githubusercontent.com/raw/steemit/steem-js/pull/390.patch | git apply npm install ``` *** Then copy `/dist/steem.min.js` into the same folder as the html file. ## Setup `git clone https://github.com/Jolly-Pirate/witness-update-html`or download the zipped files. ## Configuration - Copy the `config.json.example` and save it as `config.json` in the same folder as the HTML file. - Open `config.json` in a plaintext editor and modify it with your settings. Follow the JSON format to add or remove values. For the `wif` parameter, you have two options: either use your private active key, or encrypt it with a password then store it in the config file. I highly recommend you do the latter, which brings us to the following steps: - Open the HTML file in a browser. - Go to the **Encryption Tool** tab, paste your witness private active key, set a **strong** password and click **Encrypt**. The encrypted string will change everytime you click the button because of the random salt; don't worry, the password will decrypt the strings just fine. - Click **Decrypt** to test the decryption. - Select the encrypted text and paste it as the `wif` value in the `config.json`. <center></center> ## Usage It's straighforward and self-explanatory. - Refresh the HTML page or go to the **Broadcast Command** tab. - Enter your decryption password (leave blank if your active key is in plaintext). - Click **Load Settings**, select the public signing key you wish to use (or enter it manually). - Click **Broadcast** or **Disable Witness**, depending on your needs. <center></center> I encourage every witness to learn and understand how things are done manually **first** (cli_wallet, compiling, etc) before using convenience tools like this one. I hope you like it. ## Disclaimer I'm not responsible for any bugs, misuse or potential bad outcome. I have tested the code extensively and didn't find any issues. Nevertheless, unmerged pull requests are experimental so use at your own risk. When the fix is approved, I'll update the repo to enable the `<script src="https://cdn.steemjs.com/lib/latest/steem.min.js"></script>` line, instead of `<script src="steem.min.js"></script>`. # ADDENDUM Please redownload the files from the repository and re-encrypt your password, I did some important changes:- Increase encryption strength against bruteforce attacks by hashing the password with high iterations. The encryption/decryption now takes ~2 seconds instead of a few milliseconds, which makes bruteforcing harder. Thanks to @therealwolf for the tip and discussion about it. - Update Crypto-JS library CDN - Cleanup comments - Minor HTML changes - Upload the correct patched steem.min.js *** <center> #### Available & Reliable. I am your Witness. I want to represent You. ##### 🗳 If you like what I do, consider voting for me 🗳 [](https://steemit.com/~witnesses) ###### Check my guide about [Voting for Witnesses](https://steemit.com/witness-category/@drakos/tips-and-guidelines-voting-for-witnesses). ###### Go to https://steemit.com/~witnesses. My name is listed in the Top 50. Click https://steemitimages.com/DQmYq3yGqzvbK4JQFudeXoDp6PEtdny8vSvX5swqW5sA2fE/chevron-up.png once. ###### Alternatively you can use SteemConnect to [vote for me](https://v2.steemconnect.com/sign/account-witness-vote?witness=drakos&approve=1) or [set me as proxy](https://v2.steemconnect.com/sign/account-witness-proxy?proxy=drakos&approve=1) </center>
👍 drakos, rafaeluriel, himshweta, nainaztengra, ishan89, bobinson, timcliff, cardinalkennedy, gvand, transilvaniaman, dasvolk, elenasteem, nickskywalker, hosgug, friendsofgondor, amariespeaks, howtostartablog, fabiyamada, theuxyeti, davemccoy, terminallyill, ilovepoorpeople, simplymike, unleashpower, horriblesteemian, alexzicky, skycae, melip, ausbitbank, kubbyelizabeth, crimsonclad, vachemorte, bitcointip, discordiant, wisewoof, febri, isaria, oendertuerk, heart-to-heart, torico, mcfarhat, acidyo, mhsnmajidi, jjb777, mickeyvera, sc-steemit, olyup, alexis555, roxane, msp-lovebot, gmuxx, yvonneinoregon, r351574nc3, liberviarum, fanbasefr, thanku, wargof, planetenamek, estoy, lpv, iptrucs, elex17, fabinhocrypto, duke77, tiloupsa, wazmung, best-of-football, atelierminceur, audiodidacte, voltagrou, vianney, curiousshibby, diamantnoir, tomlabe, swisschain, pl4ym0re, didizion, imcore, yann85, naruitchi, jane83, cryptofrench, viljacques, albatar, tioneb44, depereenfils, lilirose, ibellia, olicountry, renac, mapcompass, cryptoyzzy, bergamote, youtake, uwelang, jamzed, marxrab, evildido, mohsan0073, binoy2018, jpchabry, wargofosef, fabien, taskmaster4450, crisangel, yamiza, mikenevitt, irminsoul82, jbrrd, kelos, thesport, healthykitty, baloox, mayrie28, leguidecrypto, lartist-zen, heros, akrblogs, loshcat, greenorange, amdatsible, whatsup, clayboyn, katrina-ariel, rival, properfraction, witnesspage, mahdiyari, gtg, aleister, isacoin, road2nowhere, therealwolf, yabapmatt, blocktrades, zeldandroy, norinke, gniewomir-sotel, murh, jkgautam, techslut, achiron, amosbastian, aggroed, rebeccabe, smitop, jrawsthorne, azimarliona, subaru555, matytan, fitlifefashion, sopra, alex-steem-it, ashike, shubhamn, andrianna, titusfrost, saikathussain, electronicsworld, yanes94, yidneth, pricasso, asher18, yanabrui, javiermurillo, aitov, lukestokes, bernard4ve, ten-years-before, battleaxe, teamsteem, krnel, otorgio, guillermo18, cenkparlar, hitmax, blockbrothers, janse, nasir988, andesilesteem, geofftk, grzesiekb, steem-star, inber, paintingangels, donnadavisart, the-resistance, theadmiral0, youngogmarqs, polbot, utopian-io, sachincool, warofcraft, francisftlp, ubg, philodendron, overkillcoin, sandrina.life, sapphic, botmaxu745, khairunnisaa, fertuis,