1

I believe the payload you are setting up in the metasploit handler is a staged payload (more info: https://metasploit.help.rapid7.com/docs/working-with-payloads). This means that the Python script is receiving the final stage but does not know how to handle it and, thus, crashing. Try doing the same thing, but using a stageless payload such as windows/x64/...


Only top voted, non community-wiki answers of a minimum length are eligible