I'm running Kali Linux and need to pull off a load of commands, but I'm making a script to really speed that up for me. Here is the .py file:
import os
if raw_input("Begin fake Access Point? (y/n): ")=="y":
os.system(airmon-ng)
interface = input("Enter your Interface name: ")
os.system(airmon-ng "interface" start)
I'm getting this error when trying to run it:
File "WNS.py", line 7
os.system(airmon-ng "interface" start)
^
IndentationError: unexpected indent
Tried to remove the whitespace in the beginning but then I just get this error:
IndentationError: expected an indented block
ifblock (i.e. exactly as indicated by the error message).TABkey. With 4 spaces it becomes obvious what is properly indented. Your firstos.system()line should really use 4 spaces, not one. Your last should not be indented, it is not part of anifblock.os.system(), thesubprocessmodule is a much better tool for running external scripts.