Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
1b2e940d
Commit
1b2e940d
authored
Mar 11, 2016
by
neil
Browse files
fix issue '-p' is needed by Debian nc tool
parent
07f4ec4f
Changes
1
Show whitespace changes
Inline
Side-by-side
le.sh
View file @
1b2e940d
...
@@ -339,15 +339,26 @@ _saveaccountconf() {
...
@@ -339,15 +339,26 @@ _saveaccountconf() {
_startserver
()
{
_startserver
()
{
content
=
"
$1
"
content
=
"
$1
"
_NC
=
"nc -q 1"
_NC
=
"nc -q 1 -l"
if
nc
-h
2>&1 |
grep
"nmap.org/ncat"
>
/dev/null
;
then
_NC
=
"nc"
nchelp
=
"
$(
nc
-h
2>&1
)
"
if
echo
"
$nchelp
"
|
grep
"nmap.org/ncat"
>
/dev/null
;
then
_NC
=
"nc -l"
fi
if
echo
"
$nchelp
"
|
grep
"--version"
>
/dev/null
;
then
ncver
=
"
$(
nc
--version
)
"
if
echo
"
$ncver
"
|
grep
"http://www.deepspace6.net"
>
/dev/null
;
then
_NC
=
"
$_NC
-p"
fi
fi
fi
_debug nc
"
$_NC
"
# while true ; do
# while true ; do
if
[
"
$DEBUG
"
]
;
then
if
[
"
$DEBUG
"
]
;
then
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
-l
$Le_HTTPPort
-vv
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
$Le_HTTPPort
-vv
else
else
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
-l
$Le_HTTPPort
>
/dev/null
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
$Le_HTTPPort
>
/dev/null
fi
fi
# done
# done
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment