mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 21:51:28 +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.
|
--loop that will waste your CPU power until you kill the process.
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
print("chargen")
|
print "chargen"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -4,30 +4,30 @@
|
|||||||
|
|
||||||
while true do
|
while true do
|
||||||
|
|
||||||
print("Here's a menu for you: ")
|
print "Here's a menu for you: "
|
||||||
print("1. Repeat the menu.")
|
print "1. Repeat the menu."
|
||||||
print("0. Exit.")
|
print "0. Exit."
|
||||||
|
|
||||||
io.write("Please enter your choice: ")
|
io.write "Please enter your choice: "
|
||||||
io.flush(io.stdout)
|
io.flush(io.stdout)
|
||||||
i = io.read()
|
i = io.read()
|
||||||
|
|
||||||
--WARNING! Without this line, the script will go into an infinite loop
|
--WARNING! Without this line, the script will go into an infinite loop
|
||||||
--that keeps consuming system resources when the connection gets broken.
|
--that keeps consuming system resources when the connection gets broken.
|
||||||
--Ncat's subprocesses are NOT killed in this case!
|
--Ncat's subprocesses are NOT killed in this case!
|
||||||
if i == nil then
|
if i == nil then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
print("You wrote: ",i,".")
|
print("You wrote: ", i, ".")
|
||||||
|
|
||||||
if i == "0" then
|
if i == "0" then
|
||||||
break
|
break
|
||||||
elseif i == "1" then
|
elseif i == "1" then
|
||||||
print("As you wish.")
|
print "As you wish."
|
||||||
else
|
else
|
||||||
print("No idea what you meant. Please try again.")
|
print "No idea what you meant. Please try again."
|
||||||
end
|
end
|
||||||
|
|
||||||
print() --print a newline
|
print() --print a newline
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
while true do
|
while true do
|
||||||
|
|
||||||
data = io.stdin:read(512)
|
data = io.stdin:read(512)
|
||||||
|
|
||||||
if data == nil then
|
if data == nil then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
while true do
|
while true do
|
||||||
|
|
||||||
data = io.stdin:read(512)
|
data = io.stdin:read(512)
|
||||||
|
|
||||||
if data == nil then
|
if data == nil then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
io.stdout:write(data)
|
io.stdout:write(data)
|
||||||
io.stdout:flush()
|
io.stdout:flush()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
--This is a --lua-exec "Hello world" example. In order to send to a client,
|
--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.
|
--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
|
--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.
|
--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