Skip to content

Commit c98f079

Browse files
author
unprogramable
committed
broken bridges fixed
colors updated
1 parent bf9f9e8 commit c98f079

2 files changed

Lines changed: 32 additions & 30 deletions

File tree

tbcli

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,13 @@ function clear_broken_bridges(){
204204
if [[ ! -z "$broken_bridges" ]]; then
205205
echo -e "${light_blue}broken bridges : ${light_red}"
206206
# colored logo [X] ip:port < bridge
207-
logo="\\${nc}\\${light_blue}[\\${light_red}X\\${light_blue}] \\${clear_text}"
207+
logo="\\$nc\\$light_blue[\\${light_red}X\\$light_blue] \\$clear_text"
208208
# change format text to list
209-
echo -e "$(cut -d" " -f 3 <<< "$broken_bridges" |sed "s/^/\t$logo/g")\n"
209+
echo -e "$(cut -d' ' -f 2-5 <<< "$broken_bridges"|sed "s/^/\t$logo/g"))"
210210
# do u want to remove disabled bridges ?
211-
echo -ne "${light_magenta}do you want to delete broken bridges (y/n): "
211+
echo -ne "\n${light_magenta}do you want to delete broken bridges (y/n): "
212212
read delete
213+
213214
if [[ "$delete" == [yY]* ]]; then
214215
# remove all disabled bridges
215216
sed -i "/^# Bridge obfs4/ d" "$tor_config_file"

tbcli.conf

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function tor_status() {
1515
[[ -z "$1" ]] && size_history=10 || size_history="$1"
1616
journalctl --no-pager -t Tor |tail -n "$size_history" |sed 's/^.*]: //g';
1717
}
18-
function active_bridges(){ grep "^Bridge" $tor_config_file |wc -l ;}
18+
function active_bridges(){ grep "^ *Bridge" $tor_config_file |wc -l ;}
1919
# temp files
2020
HTML_FILE="img.html"
2121
IMAGE_CAPTCHA_FILE="captcha.jpg"
@@ -25,38 +25,39 @@ BridgeFile="bridges.txt"
2525
IpSite="icanhazip.com"
2626

2727
# colors
28-
nc="\e[0m"
29-
black="\e[30m"
30-
red="\e[31m"
31-
green="\e[32m"
32-
yellow="\e[33m"
33-
blue="\e[34m"
34-
magenta="\e[35m"
35-
cyan="\e[36m"
36-
light_gray="\e[37m"
37-
dark_gray="\e[90m"
38-
light_red="\e[91m"
39-
light_green="\e[92m"
40-
light_yellow="\e[93m"
41-
light_blue="\e[94m"
42-
light_magenta="\e[95m"
43-
light_cyan="\e[96m"
44-
white="\e[97m"
28+
nc="\e[m"
29+
black="\e[0;30m"
30+
red="\e[0;31m"
31+
green="\e[0;32m"
32+
yellow="\e[0;33m"
33+
blue="\e[0;34m"
34+
magenta="\e[0;35m"
35+
cyan="\e[0;36m"
36+
white="\e[0;37m"
37+
38+
light_gray="\e[0;1;90m"
39+
light_red="\e[0;1;91m"
40+
light_green="\e[0;1;92m"
41+
light_yellow="\e[0;1;93m"
42+
light_blue="\e[0;1;94m"
43+
light_magenta="\e[0;1;95m"
44+
light_cyan="\e[0;1;96m"
45+
light_white="\e[0;1;97m"
4546

4647
# tor reset separator
4748
reset_sep="${light_red} >${light_blue}%"
4849

4950
# sections separator
50-
sections_sep="${light_red}---------------------------------------------------"
51+
sections_sep="$light_red---------------------------------------------------"
5152

5253
# tor status setting color
53-
status_sep="${light_blue}---------------------------------------------------"
54-
status_color="\e[0;2;93m"
55-
status_num_color="\e[0;1;91m"
56-
status_important="\e[0;1;92m"
57-
status_important_line="\e[0;2;92m"
58-
status_bad_bridge="\e[0;1;91m"
59-
status_bad_bridge_line="\e[0;2;91m"
54+
status_sep="$light_blue---------------------------------------------------"
55+
status_color="$light_yellow"
56+
status_num_color="$light_red"
57+
status_important="$light_green"
58+
status_important_line="$light_green"
59+
status_bad_bridge="$light_red"
60+
status_bad_bridge_line="$light_red"
6061

6162
# clear broken bridges
62-
clear_text="\e[0;2;1;91m"
63+
clear_text="$light_red"

0 commit comments

Comments
 (0)