summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/https@.sh16
-rw-r--r--script/sslcat.sh10
-rw-r--r--script/sslconnect.sh10
3 files changed, 36 insertions, 0 deletions
diff --git a/script/https@.sh b/script/https@.sh
new file mode 100644
index 0000000..896cc7f
--- /dev/null
+++ b/script/https@.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+host=${1-0}
+path=${2-}
+port=${3-443}
+args=""
+if [ $# -gt 3 ]
+then
+ shift; shift; shift
+ args="$@"
+fi
+echo "GET /${path} HTTP/1.1
+Host: $host:$port
+" | sslclient -XRHl0 $args -- "$host" "$port" sh -c '
+ addcr >&7
+ exec delcr <&6
+' | awk '/^$/ { body=1; next } { if (body) print }'
diff --git a/script/sslcat.sh b/script/sslcat.sh
new file mode 100644
index 0000000..716c6ab
--- /dev/null
+++ b/script/sslcat.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+host=${1-0}
+port=${2-443}
+args=""
+if [ $# -gt 2 ]
+then
+ shift; shift
+ args="$@"
+fi
+exec sslclient -RHl0 $args -- "$host" "$port" sh -c 'exec cat <&6'
diff --git a/script/sslconnect.sh b/script/sslconnect.sh
new file mode 100644
index 0000000..a28aef6
--- /dev/null
+++ b/script/sslconnect.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+host=${1-0}
+port=${2-465}
+args=""
+if [ $# -gt 2 ]
+then
+ shift; shift
+ args="$@"
+fi
+exec sslclient -XRHl0 $args -- "$host" "$port" mconnect-io