From de863ae72e35b344bbaf4b1103d8f41cffe4566b Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Mon, 26 Jun 2017 12:10:36 +0000 Subject: [PATCH] added an interactive nsh client --- modules/applications/inshc.lua | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 modules/applications/inshc.lua diff --git a/modules/applications/inshc.lua b/modules/applications/inshc.lua new file mode 100644 index 0000000..fb6e488 --- /dev/null +++ b/modules/applications/inshc.lua @@ -0,0 +1,8 @@ +function inshc(hA,pO,pW) + write("Address: ") + if hA then print(hA) else hA=readln() end + write("Port: ") + if pO then print(pO) else pO=readln() end + if pW then print("Password provided.") else write("Password (empty for no auth): ") readln("*") end + if pW == "" or pW == nil then nshc(pO,hA) else nshcs(pO,hA,pW) end +end