summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md28
-rwxr-xr-x[-rw-r--r--]rif-checkfriends.sh15
-rwxr-xr-xrif-importfriends.sh15
-rwxr-xr-xrif-listfriends.sh4
4 files changed, 54 insertions, 8 deletions
diff --git a/README.md b/README.md
index 0cbcd48..050f0bb 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,9 @@ To become a real IPv6 friend, you need to do the following things:
- Setup a webserver on your computer
- Export your key and all real IPv6 friend keys to your webserver as
"rifkeys.txt
-- For each of your friends, check whether they are online!
+- For each of your friends, check whether they are online
+- Import the friends of your friends and check whether they are
+ online, too!
### Example: Generating a key with the right comment
@@ -122,21 +124,45 @@ gpg -a --export RIF > /var/www/html/rifkeys
### Example: List your friends
+You can use the included rif-listfriends.sh or directly gpg:
+
```
[1:40] line:~% gpg --list-keys --with-colons | grep RIF | awk -F: '{ print $10 }' | sed 's/\\x3a/:/'
Nico Schottelius (RIF https://nico.ungleich.cloud) <ipv6@nico.ungleich.cloud>
Nico Schottelius (myself) (RIF https://nico2.ungleich.cloud) <nico@nico.ungleich.cloud>
```
+
### Example: Checking which friends are online
Use the included rif-checkfriends.sh script or iterate yourself over
above output.
```
+[1:54] line:realipv6friend% sh rif-checkfriends.sh
+Checking Nico Schottelius on https://nico.ungleich.cloud ...
+Nico Schottelius is online
+Checking Nico Schottelius (myself) on https://nico2.ungleich.cloud ...
+Nico Schottelius (myself) is offline
+[1:54] line:realipv6friend%
+
+```
+
+### Example: Importing friends of my friend
+Importing friends of a friend is as simple as importing all the
+exported keys! We import friends directly from the URL of a friend:
```
+curl -6 -s https://nico.ungleich.cloud/rifkeys | gpg --import
+```
+
+You can also use
+
+### Example: Sending a message to a friend
+
+Simply use your mail program for that.
+And obviously enable signing & encrypting the email.
## To be added
diff --git a/rif-checkfriends.sh b/rif-checkfriends.sh
index af7e4d6..24bb12f 100644..100755
--- a/rif-checkfriends.sh
+++ b/rif-checkfriends.sh
@@ -3,12 +3,13 @@
gpg --list-keys --with-colons | grep RIF | awk -F: '{ print $10 }' | sed 's/\\x3a/:/' | (
while read line
- do name=$(echo $line | sed 's/\(.*\)(.*/\1/')
- # Assume by default offline
- online=offline
- url=$(echo $line | sed -e 's/.*(RIF //' -e 's/).*//')
- echo "Checking $name on $url ..."
- curl -s "$url" > /dev/null && online=online
- echo $name is $online
+ do
+ name=$(echo $line | sed 's/\(.*\)(.*/\1/')
+ # Assume by default offline
+ online=offline
+ url=$(echo $line | sed -e 's/.*(RIF //' -e 's/).*//')
+ echo "Checking $name on $url ..."
+ curl -6 -s "$url" > /dev/null && online=online
+ echo $name is $online
done
)
diff --git a/rif-importfriends.sh b/rif-importfriends.sh
new file mode 100755
index 0000000..887abc2
--- /dev/null
+++ b/rif-importfriends.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# 2019-09-10, Nico Schottelius, Seoul
+
+if [ $# -lt 1 ]; then
+ echo "$0: <URL> [URL...]"
+ echo "URL: of your real IPv6 friend(s)"
+ exit 1
+fi
+
+while [ $# -ge 1 ]; do
+ url=$1; shift
+ fullurl=${url}/rifkeys
+
+ curl -6 -s "${fullurl}" | gpg --import
+done
diff --git a/rif-listfriends.sh b/rif-listfriends.sh
new file mode 100755
index 0000000..f228be5
--- /dev/null
+++ b/rif-listfriends.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# 2019-09-10, Nico Schottelius, Seoul
+
+gpg --list-keys --with-colons | grep RIF | awk -F: '{ print $10 }' | sed 's/\\x3a/:/'