Skip to content
Snippets Groups Projects
Commit f323caf1 authored by Recolic's avatar Recolic :house_with_garden:
Browse files

.rrdpupdate

parent 00244fc2
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
# v1.03: allows setting env target_line
# v1.04: if target_name starts with @, it is ssh target (customize port not supported yet). Allows bash command in password.
# v1.05: accept new rsec, and allow space in name
# v1.06: trim extra space in user/pass/host, not only NAME
function die
echo $argv 1>&2
......@@ -14,25 +15,25 @@ if test -z $target
end
set targets "
NAME|USERNAME|PASSWORD|HOSTNAME
msdev |recolic|sh://rsec DEVBOX|proxy-cdn.recolic.net:30623
msdev-backup|recolic|sh://rsec DEVBOX|proxy-cdn.recolic.net:30624
labjump|fareast\bensl|sh://rsec WEAK12|10.209.180.22
lanbox |recolic|sh://rsec WEAK10|10.100.100.101:30473
lanbox-tmp|recolic|sh://rsec WEAK10|base.ddns1.recolic.cc:30573
cnbox |recolic|sh://rsec WEAK10|proxy-cdn.recolic.net:30625
host16 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.18.31
host18 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.18.29
host32 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.10.94
host33 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.10.92
hosttm |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.14.35
hostt2 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.14.29
host1030 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.10.37
host2021 |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.15.30
kedardbg |local\Administrator|sh://rsec OVL_HOST_RDP|10.10.12.79
kedardbg2|local\Administrator|sh://rsec OVL_HOST_RDP|10.10.12.80
tmpvsbox|recolic|sh://rsec WEAK10|localhost:30477
@openwrt|root|sh://genpasswd 10.100.100.1|10.100.100.1
NAME |USERNAME |PASSWORD |HOSTNAME
msdev |recolic |sh://rsec DEVBOX |proxy-cdn.recolic.net:30623
msdev-backup|recolic |sh://rsec DEVBOX |proxy-cdn.recolic.net:30624
labjump |fareast\bensl|sh://rsec WEAK12 |10.209.180.22
lanbox |recolic |sh://genpasswd lanbox |10.100.100.101:30473
lanbox-tmp |recolic |sh://genpasswd lanbox |base.ddns1.recolic.cc:30573
cnbox |recolic |sh://rsec WEAK10 |proxy-cdn.recolic.net:30625
host16 |Administrator|sh://rsec OVL_HOST_RDP |10.10.18.31
host18 |Administrator|sh://rsec OVL_HOST_RDP |10.10.18.29
host32 |Administrator|sh://rsec OVL_HOST_RDP |10.10.10.94
host33 |Administrator|sh://rsec OVL_HOST_RDP |10.10.10.92
hosttm |Administrator|sh://rsec OVL_HOST_RDP |10.10.14.35
hostt2 |Administrator|sh://rsec OVL_HOST_RDP |10.10.14.29
host1030 |Administrator|sh://rsec OVL_HOST_RDP |10.10.10.37
host2021 |Administrator|sh://rsec OVL_HOST_RDP |10.10.15.30
kedardbg |Administrator|sh://rsec OVL_HOST_RDP |10.10.12.79
kedardbg2 |Administrator|sh://rsec OVL_HOST_RDP |10.10.12.80
tmpvsbox |recolic |sh://rsec WEAK10 |localhost:30477
@openwrt |root |sh://genpasswd 10.100.100.1|10.100.100.1
"
if test $target = help
......@@ -46,9 +47,9 @@ end
test -n "$target_line"
or set target_line (echo $targets | grep "^$target *|")
or die "Target $target not found."
set user (echo $target_line | cut -d '|' -f 2)
set pass (echo $target_line | cut -d '|' -f 3)
set host (echo $target_line | cut -d '|' -f 4)
set user (string trim (echo $target_line | cut -d '|' -f 2))
set pass (string trim (echo $target_line | cut -d '|' -f 3))
set host (string trim (echo $target_line | cut -d '|' -f 4))
if string match "sh://*" $pass > /dev/null
# need to expand password
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment