Same language, different codeFollow in NewsfeedFollowing
You've been reading about this encryption thing, but what can you use it for?
I've seen that lots of people want to know how to change their ZeroId, so I made a script that will encrypt your current user, decrypt your other user and then change your user. Sounds good?
If you use anything that's not Linux (or maybe Mac), then this won't work for you. You should try Linux, it's what cool people use this days ( :P ) and you don't need to uninstall your current operating system. A lot of people recommend Linux Mint for beginners.
This "tutorial" assumes that your ZeroNet client is not running and that you have two users.json files both registered with ZeroIds. Simply move your current file to another folder and a new one will be created when you start ZeroNet (or maybe even while running).
First thing you gotta do is get yourself some encryption keys.
A few notes before:
The majority of people  (;P) advertise against RSA-4096 (that's the size of the key in bits) saying that it's unnecessary since you gain less and less security as your key size increases (see Diminishing returns). My take is that you can't have too much of a good thing (how naive). But read this to see why they say it's unnecessary.
Pro-tip: since we are going to use these keys for scripts, give it some simple, one word name, it'll help later.
So, when they ask you for your Real name, call it Scripts.
Now, before I give you the script, make a folder where you will save your encrypted ZeroIds. For example
/home/muja/backups/zeronet/users or whatever works best for you. Just remember to put it on the script bellow.
Open a text editor and paste the second code-block (not changer.sh) on it.
#!/bin/bash # Backup current user mkdir -p /tmp/zeronet/users/$1 > /dev/null 2>&1 cp /path/to/zeronet/data/users.json /tmp/zeronet/users/$1/users.json cp /path/to/zeronet/data/sites.json /tmp/zeronet/users/$1/sites.json cd /tmp/zeronet/users zip -rq $1.zip $1/ > /dev/null 2>&1 gpg --yes -r Scripts -o /home/muja/backups/zeronet/users/$1.zip.asc -aes /tmp/zeronet/users/$1.zip rm -f $1.zip rm -rf $1/ # Change user gpg -o /tmp/zeronet/users/$2.zip /home/muja/backups/zeronet/users/$2.zip.asc unzip $2.zip > /dev/null 2>&1 cp $2/users.json /path/to/zeronet/data/users.json rm -f $2.zip rm -rf $2/
After you make the necessary changes (the path to your zeronet folder, the backup folder, your key name...) give the script permissions to run, like so:
chmod 755 changer.sh
Get an alias to call your script, like so:
echo "alias zch='/path/changer.sh'" >> ~/.bashrc
Run the script (
zch muja muja). Change muja to your user (yes, two times).
Cool, your user (and your sites list) should be encrypted on
Now put your other user on
/path/to/zeronet/data/users.json and run the command again, but this time calling your other user:
zch othermuja muja
The first is your current user and the second is the one you want to change to.
This script is a lot simpler than it might look. If anyone tried doing this and it did not work, make sure you changed these things:
/path/to/zeronet # Path to your zeronet folder Scripts # Your Real name on your key /home/muja/backups/zeronet/users #The place to save your users
There's also the chance that I, while adapting this code for publishing, may have made some errors. So feel free to comment bellow or send me a ZeroMail.
It's very unlikely that someone will do this since it's such a niche thing, I just wanted to publish it anyway :)