python 2.7 - Pass string to subprocess -


i'm trying pass input subprocess run system command when ran should put interface monitor mode. it's not doing it's printing if typed command airmon-ng self no args

here's have

import subprocess   = raw_imput("enter interface name")  opt = subprocess.call(["airmon-ng","start", a], shell=false) 

i new python , became interested in learning python.

you missing closing quotation mark.

raw_input("enter interface name") 

also resource learning http://docs.python.org/2/library/subprocess.html

--edit--

taking above source

subprocess.call(args, *, stdin=none, stdout=none, stderr=none, shell=false)

run command described args. wait command complete, return returncode attribute

so if print out 'opt' you'll see '0' if command executed successfully. if there output want capture checkout this question


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -