mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
Fix coding style of all scripts with Lunadry.
This commit is contained in:
@@ -6,6 +6,6 @@
|
||||
--loop that will waste your CPU power until you kill the process.
|
||||
|
||||
while true do
|
||||
print("chargen")
|
||||
print "chargen"
|
||||
end
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user