Sultan
0
Q:

how to use subprocess in python

import subprocess
subprocess.run(["ls", "-l"])
0
try:
    subprocess.check_output(...)
except subprocess.CalledProcessError as e:
    print(e.output)
0
#one example of a way to use subprocesses in python for kali is chanign the mac adress
#all you have to do is 
import subprocess

subporcess.call("ifconfig " + example + " hw ether ")

#or for security use
subprocess.call(["ifconfig", example, "hw", "ether"])#this is safe as no one can run extra scripts
0

New to Communities?

Join the community