/
githubmirror
/
nmap
Обзор
Документация
Войти
/
githubmirror
/
nmap
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ncat/scripts/echo.lua
16 строк
335 B
d33tah
Fix echo.lua bug related to how io.stdin:read(n) works.
04 сен 2013, 19:40
04 сен 2013, 19:40
ca3ceec
Код
Авторство
О чём код?
--Emulates the RFC 862 echo service, behaving like Unix's "cat" tool. while true do --We're reading in 1-byte chunks because calls like io.stdin:read(512) would --wait for full 512 bytes of data before continuing. data = io.stdin:read(1) if data == nil then break end io.stdout:write(data) io.stdout:flush() end