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
3aff11f6
Commit
3aff11f6
authored
Mar 13, 2016
by
neil
Browse files
fix nc compatible. try '-p' first
parent
051c706d
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
3aff11f6
...
...
@@ -346,19 +346,17 @@ _startserver() {
if
echo
"
$nchelp
"
|
grep
"nmap.org/ncat"
>
/dev/null
;
then
_NC
=
"nc -l"
fi
#debian
ncver
=
"
$(
nc
--version
2>&1
)
"
if
echo
"
$ncver
"
|
grep
"http://www.deepspace6.net"
>
/dev/null
;
then
_NC
=
"
$_NC
-p"
fi
_debug
"
$_NC
$Le_HTTPPort
"
# while true ; do
if
[
"
$DEBUG
"
]
;
then
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
$Le_HTTPPort
-vv
if
!
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
-p
$Le_HTTPPort
-vv
;
then
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
$Le_HTTPPort
-vv
;
fi
else
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
$Le_HTTPPort
>
/dev/null
if
!
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
-p
$Le_HTTPPort
>
/dev/null
;
then
echo
-e
-n
"HTTP/1.1 200 OK
\r\n\r\n
$content
"
|
$_NC
$Le_HTTPPort
>
/dev/null
fi
fi
if
[
"
$?
"
!=
"0"
]
;
then
_err
"nc listen error."
...
...
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