-
Notifications
You must be signed in to change notification settings - Fork 7
/
cable-info
executable file
·49 lines (31 loc) · 1.9 KB
/
cable-info
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh -e
cableid=cable-id
undefined="undefined"
title="Cables Communication Identity"
username=`${cableid} user`
torhost=`${cableid} tor | sed 's/\.onion$//'`
i2phost=`${cableid} i2p | sed 's/\.b32\.i2p$//'`
if [ "${username}" = "${undefined}" -o "${torhost}${i2phost}" = "${undefined}${undefined}" ]; then
message="<big><b>${title}</b></big>
Cables communication addresses have not been configured.
When using cables in Liberté Linux, this is typically a result of disabled persistence: booting from an ISO image in a virtual machine, booting from an actual CD, or write-protecting the boot media.
In order to enable persistence, install Liberté Linux to a writable media, such as a USB stick or an SD card."
exec zenity --error --title="${title}" --text="${message}"
fi
splitre='s@\([[:alnum:]]\{4\}\)\([[:alnum:]]\{4\}\)\?@<span foreground="red">\1</span><span foreground="blue">\2</span>@g'
username=`echo "${username}" | sed "${splitre}"`
addrs=
if [ "${torhost}" != "${undefined}" ]; then
torhost=`echo "${torhost}" | sed "${splitre}"`.onion
addrs="${addrs} <big><tt>${username}</tt>@<tt>${torhost}</tt></big>"
fi
if [ "${i2phost}" != "${undefined}" ]; then
i2phost=`echo "${i2phost}" | sed "${splitre}"`.b32.i2p
addrs="${addrs} <big><tt>${username}</tt>@<tt>${i2phost}</tt></big>"
fi
message="<big><b>${title}</b></big>
You can use the following addresses for cables communication via Claws-Mail:
${addrs}
Always check the username of incoming messages — its authenticity is guaranteed by the cables communication protocol. When manually reading addresses, keep in mind that only digits <tt>2</tt>–<tt>7</tt> are used, the rest are letters.
You can set either address in Claws-Mail account settings. Upon startup, Claws-Mail will reset the account to Tor-based address if the configured address is not one of the above."
exec zenity --info --title="${title}" --text="${message}"