To pass terminal traffic through Burp, first open up Burp and then you should probably turn the Intercept off. At least, that is what I like to do.
We will be using Proxychains here.
So, first, let's configure it.
Go to the end and write,
#burpsuite http 127.0.0.1 8080 https 127.0.0.1 8080
Save and exit vi.
Now try running your command as,
proxychains python3 exploit.py