Contents of /alx-src/branches/alx-web-070/scripts/socket-send/mcore-socket-send.sh
Parent Directory | Revision Log
Revision 9661 -
(show annotations)
(download)
(as text)
Wed Aug 2 13:21:57 2017 UTC (7 years, 1 month ago) by niro
File MIME type: application/x-sh
File size: 556 byte(s)
Wed Aug 2 13:21:57 2017 UTC (7 years, 1 month ago) by niro
File MIME type: application/x-sh
File size: 556 byte(s)
-reworked socket send to be sha1 compatible with sslsvd, direct ssl with openssl not working anymore. need to rewrite sslsvd or deprecate it
1 | #!/bin/bash |
2 | |
3 | die() { echo "ERROR: $@"; exit 1; } |
4 | |
5 | for argv in $* |
6 | do |
7 | case $1 in |
8 | --ip=*) ip="${1##*=}" ;; |
9 | --port=*) port="${1##*=}" ;; |
10 | --fingerprint=*) fingerprint="${1##*=}" ;; |
11 | --command=*) command="${1##*=}" ;; |
12 | esac |
13 | shift |
14 | done |
15 | |
16 | # sanity checks |
17 | [ -x $(type -P nssl) ] || die "nssl not found" |
18 | [[ -n ${ip} ]] || die "no ip given" |
19 | [[ -n ${port} ]] || die "no port given" |
20 | [[ -n ${fingerprint} ]] || die "no fingerprint given" |
21 | [[ -n ${command} ]] || die "no command given" |
22 | |
23 | nssl "${ip}" "${port}" << EOF |
24 | certauth "${fingerprint}" |
25 | ${command} |
26 | quit |
27 | EOF |
28 |
Properties
Name | Value |
---|---|
svn:executable | * |