File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,13 @@ def check_msf():
4242 else :
4343 return False
4444
45+ # Check kismet session status
46+ def check_kismet ():
47+ if 'SCREEN -R -S kismet' in commands .getoutput ('/bin/ps -ef' ):
48+ return True
49+ else :
50+ return False
51+
4552## Local Functions ##
4653#############################
4754
@@ -103,10 +110,23 @@ def button(number):
103110 return
104111
105112 # Kismet
113+ process = subprocess .call ("setterm -term linux -back default -fore white -clear all" , shell = True )
106114 pygame .quit ()
107- subprocess .call ("/usr/bin/sudo -u pi /usr/bin/kismet" , shell = True )
115+ kalipi .run_cmd ("/usr/bin/sudo -u pi screen -R -S kismet /usr/bin/kismet" )
116+ process = subprocess .call ("setterm -term linux -back default -fore black -clear all" , shell = True )
108117 os .execv (__file__ , sys .argv )
109118
119+ if check_kismet ():
120+ button3 .fntColor = green
121+ button3 .draw ()
122+ pygame .display .update ()
123+
124+ else :
125+ button3 .fntColor = tron_whi
126+ button3 .draw ()
127+ pygame .display .update ()
128+ return
129+
110130 if number == 4 :
111131 if button4 .disable == 1 :
112132 return
@@ -229,7 +249,12 @@ def menu3():
229249 button3 .draw ()
230250 else :
231251 # Add button launch code here
232- button3 .draw ()
252+ if check_kismet ():
253+ button3 .fntColor = green
254+ button3 .draw ()
255+ else :
256+ button3 .fntColor = tron_whi
257+ button3 .draw ()
233258
234259 # Second Row
235260 # Button 4
You can’t perform that action at this time.
0 commit comments