基于ncat的简易web服务器
生活随笔
收集整理的這篇文章主要介紹了
基于ncat的简易web服务器
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
首先裝一個ncat
yum install ncat apt get install ncat whatever...準備一個html頁面文件 data.txt
<html><body><h1>ncat based web server</h1><h1>ncat based web server</h1><h1>ncat based web server</h1><h1>ncat based web server</h1><h1>ncat based web server</h1><h1>ncat based web server</h1><h1>ncat based web server</h1></body> </html>開啟服務
ncat -lkv 5000 --send-only --sh-exec "echo -e 'cat HTTP/1.1 200 OK\r\n'; cat data.txt"總結
以上是生活随笔為你收集整理的基于ncat的简易web服务器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ncat 重复发送同一个文件
- 下一篇: java不使用IDE导入json