diff --git a/ncat/scripts/chargen.lua b/ncat/scripts/chargen.lua index dcf28ba9c..3e506ef05 100644 --- a/ncat/scripts/chargen.lua +++ b/ncat/scripts/chargen.lua @@ -6,6 +6,6 @@ --loop that will waste your CPU power until you kill the process. while true do - print("chargen") + print "chargen" end diff --git a/ncat/scripts/conditional.lua b/ncat/scripts/conditional.lua index 18b31e767..8af297542 100644 --- a/ncat/scripts/conditional.lua +++ b/ncat/scripts/conditional.lua @@ -4,30 +4,30 @@ while true do - print("Here's a menu for you: ") - print("1. Repeat the menu.") - print("0. Exit.") + print "Here's a menu for you: " + print "1. Repeat the menu." + print "0. Exit." - io.write("Please enter your choice: ") - io.flush(io.stdout) - i = io.read() + io.write "Please enter your choice: " + io.flush(io.stdout) + i = io.read() - --WARNING! Without this line, the script will go into an infinite loop - --that keeps consuming system resources when the connection gets broken. - --Ncat's subprocesses are NOT killed in this case! - if i == nil then - break - end + --WARNING! Without this line, the script will go into an infinite loop + --that keeps consuming system resources when the connection gets broken. + --Ncat's subprocesses are NOT killed in this case! + if i == nil then + break + end - print("You wrote: ",i,".") + print("You wrote: ", i, ".") - if i == "0" then - break - elseif i == "1" then - print("As you wish.") - else - print("No idea what you meant. Please try again.") - end + if i == "0" then + break + elseif i == "1" then + print "As you wish." + else + print "No idea what you meant. Please try again." + end - print() --print a newline + print() --print a newline end diff --git a/ncat/scripts/discard.lua b/ncat/scripts/discard.lua index 9979c1466..6b386f60f 100644 --- a/ncat/scripts/discard.lua +++ b/ncat/scripts/discard.lua @@ -2,10 +2,10 @@ while true do - data = io.stdin:read(512) + data = io.stdin:read(512) - if data == nil then - break - end + if data == nil then + break + end end diff --git a/ncat/scripts/echo.lua b/ncat/scripts/echo.lua index 0db39d01e..48b71749e 100644 --- a/ncat/scripts/echo.lua +++ b/ncat/scripts/echo.lua @@ -2,13 +2,13 @@ while true do - data = io.stdin:read(512) + data = io.stdin:read(512) - if data == nil then - break - end + if data == nil then + break + end - io.stdout:write(data) - io.stdout:flush() + io.stdout:write(data) + io.stdout:flush() end diff --git a/ncat/scripts/hello-luaexec.lua b/ncat/scripts/hello-luaexec.lua index bce250acf..31bd49862 100644 --- a/ncat/scripts/hello-luaexec.lua +++ b/ncat/scripts/hello-luaexec.lua @@ -1,4 +1,4 @@ --This is a --lua-exec "Hello world" example. In order to send to a client, --all you need to do is output it to the standard output. -print("Hello, world!") +print "Hello, world!" diff --git a/ncat/scripts/whatismyip.lua b/ncat/scripts/whatismyip.lua index f9409724d..13ade2238 100644 --- a/ncat/scripts/whatismyip.lua +++ b/ncat/scripts/whatismyip.lua @@ -1,4 +1,4 @@ --A "what is my IP" service code. Since most web browsers put up with servers --not sending proper HTTP headers, you can simply query the service with it. -print(os.getenv("NCAT_REMOTE_ADDR")) +print(os.getenv "NCAT_REMOTE_ADDR")