Update your keys - If need be

Due to recent events with one of our friends, and the fact that so many people didn't change their keys when steem/hive split. I took it upon myself to make a nice little Self Contained Password Update Script that lets you update your keys and master password using your owner key.

I know there are ways to do it on hive.blog and peakd, but I have a lot of accounts that I help manage, and I don't want to have to set up keychain for each and everyone just to change the keys again.

So, this little tool was born.

No reason it shouldn't look pretty!

It is of course running in DRY_RUN mode, and it's simulated in the picture, and No, those are not live keys before anyone freaks out. It was just to show you what the tool looks like and what it does. It is written in python and uses hive-nectar and the rich library, but it's self contained if you used uv, since it's in UV script mode, it will handle the dependencies in the uv cache and run it with the python version needed etc, just by calling ./update_password.py / uv run --script update_password.py or if you already have hive-nectar installed via pip or in a venv, you can run it the old fashioned way with python3 update_password.py, but I will say that I love how uv handles the dependencies so seamlessly and easily and I don't know that I could ever go back to the old way of managing deps.

Might do a couple of posts on uv, as it truly is an amazing tool. (Yes, I find it hilarious that the best tool for python is written in rust, but I digress.)

As always,
Michael Garcia a.k.a. TheCrazyGM



0
0
0.000
7 comments
avatar
(Edited)

Rusty UV, I want more!

Truly you are a legend my brother.

0
0
0.000
avatar

I have been looking through the repo for a bit now, but I was wondering how to make that stuff work with keychain. I just got vs code, git, and the python extension. So I am guessing the next step is fork the repo and add it to my git/github to start playing. I am on Windows btw. Also can this stuff be hosted on a local host for testing, and what risks would that present if any?

0
0
0.000
avatar

I'll try to answer what I can.

RE: windows, yes it should work just fine, it's an interpreted language and therefor system neutral. The setup is a bit different, but functionally the same.

RE: local testing, that's the proper way to do things, learn and test things on your own stuff before trying to make things work in the wild.

RE: keychain, if what you want to do is make user facing things, python is probably not the answer. There are tools to make ui/guis and stuff, but most of the stuff is going to be command line or terminal interface.

You have come to a very important question you have to ask yourself if you want to learn to program, There is really 3 options.

  1. Frontend - User interfaces, webpages, things that the user interacts with, e.g. with keychain, which you would want to learn javascript/typescript and html / css etc.
  2. Backend - Stuff the user never sees, automation, bots, apis, servers e.g. this is the kind of thing nectar is really for, and by extension python in general.
  3. Fullstack - These are apps that do both, front and back and communicates with itself, single page applications, this is where a lot of the js frameworks fit, react, svelte, next.js, nuxt, vue, angular etc. It does have the added benefit of using user facing tools like keychain for the user, but I find it complex and hard to learn really.

Whichever route you chose, I'll be more than happy to try to lend a hand where I can.

0
0
0.000
avatar

From what I have read, at lest having an understanding of full stack development will be beneficial to learning both front and back end. Clearly I don't know the answers, or hell even the questions to ask yet. Thank you very much for offering to help me learn! The only stuff I have any experience with JS, Lua, and some html as far as programing. However, I do have a pretty good understand of electrical systems and how transistors (aka relays) do math. The problem I keep running into is everything I think of to start trying to program would be easier for me to just build with mechanical parts.

0
0
0.000
avatar

Believe it or not, I actually understand. My problem is I always had the want and the drive, but never anything to do. It wasn't until @ecoinstant gave me some direction that I really started to thrive.

Yes, if it's understanding you want, I would at least look into fullstack. It gives you a taste of both, and you will find out you prefer one or the other. I learned very quickly I hate frontend work. I'm not artistic, I can't "design" things that look good, etc. But I love backend work. I feel right at home.

Having some JS and Lua under your belt will help actually a lot. Fundamentally most languages are similar, other than syntax differences.

RE: The original post, If you are wanting to see something that fundamentally does the same thing but on the frontend side. I worked on this the last two days: Hive Key Changer and you can find the source for it here, now it doesn't use keychain as keychain doesn't sign things with owner keys, which is what is required for key change, but you can see some other examples of keychain use in that same repo.

0
0
0.000
avatar

lolz! I was about to read that post when the notification popped up that you replied.

0
0
0.000