Thanks to the commands you’ve mentioned I was able to deal with my issue.Firstly I’ve noticed that I’ve been calling the commands with the subprocess in an innapropriate way,I can’t figure out how to call them properly,they just don’t get executed,I need to type them manually.Before when I typed the echo command manually I think the iptables were blocking it,cause I think I didn’t stop the dns spoofer and they were refreshing each second.Anyway what I did,was just typing iptables –flush and restarting the spoofer,it works now,thanks once again!
But there’s is one thing,the dns spoofer cuts the connection,and as I have written I can’t deal with calling the echo and iptables commands.
I would like to make to make the program more convienient to use,by automating the necessary commands.
I was calling both the echo and iptables commands like this:
command_line = “iptables -I FORWARD -j NFQUEUE –queue-num 0”
args = shlex.split(command_line)
I copied this method from stack overflow,because with the echo command it was showing some kind of directory error.
I also tried the subprocess.call with both commands but it didn’t work either.I’m stuck!Can you help me out?