#1
So guys I have a Python stub reverse shell payload.

When I execute the Python file in VS Code on my target computer it generates a stable backdoor to my machine.

But in reality no one is gonna execute .py files and so I tried to convert it to .exe using pyinstaller.

I used the command
Code:
pyinstaller --onefile --console stub.py

The problem is the .exe file generated opens up the command prompt and crashes immediately.

The result I get on my Kali machine is :
Code:
[*] 192.168.75.1 - Meterpreter session 12 closed. Reason: Died
[-] Meterpreter session 12 is not valid and will be closed

Then a tried generating a Window based exe using
Code:
pyinstaller --onefile --windowed stub.py

On running .exe file I get following error:

https://ibb.co/YtWwtv9

With output on Kali Machine as:
Code:
[*] Sending stage (24768 bytes) to 192.168.75.1
[*] 192.168.75.1 - Meterpreter session 14 closed. Reason: Died
[-] Meterpreter session 14 is not valid and will be closed

So, guys please help me in creating a stable executable file (.exe) so that I can generate a backdoor through it!