Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
daily-scripts
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
daily-scripts
Commits
f323caf1
There was an error fetching the commit references. Please try again later.
Commit
f323caf1
authored
1 month ago
by
Recolic
Browse files
Options
Downloads
Patches
Plain Diff
.rrdpupdate
parent
00244fc2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mybin/rrdp
+23
-22
23 additions, 22 deletions
mybin/rrdp
with
23 additions
and
22 deletions
mybin/rrdp
+
23
−
22
View file @
f323caf1
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment