Skip to content

Commit

Permalink
Launch kismet in screen session
Browse files Browse the repository at this point in the history
  • Loading branch information
Re4son committed Feb 13, 2017
1 parent 1e770de commit 1fe3ecd
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions Menus/menu-3.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def check_msf():
else:
return False

# Check kismet session status
def check_kismet():
if 'SCREEN -R -S kismet' in commands.getoutput('/bin/ps -ef'):
return True
else:
return False

## Local Functions ##
#############################

Expand Down Expand Up @@ -103,10 +110,23 @@ def button(number):
return

# Kismet
process = subprocess.call("setterm -term linux -back default -fore white -clear all", shell=True)
pygame.quit()
subprocess.call("/usr/bin/sudo -u pi /usr/bin/kismet", shell=True)
kalipi.run_cmd("/usr/bin/sudo -u pi screen -R -S kismet /usr/bin/kismet")
process = subprocess.call("setterm -term linux -back default -fore black -clear all", shell=True)
os.execv(__file__, sys.argv)

if check_kismet():
button3.fntColor = green
button3.draw()
pygame.display.update()

else:
button3.fntColor = tron_whi
button3.draw()
pygame.display.update()
return

if number == 4:
if button4.disable == 1:
return
Expand Down Expand Up @@ -229,7 +249,12 @@ def menu3():
button3.draw()
else:
# Add button launch code here
button3.draw()
if check_kismet():
button3.fntColor = green
button3.draw()
else:
button3.fntColor = tron_whi
button3.draw()

# Second Row
# Button 4
Expand Down

0 comments on commit 1fe3ecd

Please sign in to comment.