SHELL send SIGHUP and get output from xterm

188 views Asked by At

Would like to know if there's a way to send SIGHUP to stop airodump after "n" seconds which is running in xterm and catch its output (ESSID, NAME) ?

Interface=$(airmon-ng | awk '!/Interface/ {print $2}')
xterm -hold -e airodump-ng $Interface &

I tried to run xterm with timeout but it didn't work out and I have no clue how to get the output of xterm.

1

There are 1 answers

0
peacemaker On

I just realized, that "-hold" was the cause that made "timeout" not working properly. Also with adding "-w", airodump-ng creates a ".cap file" ($myfile) with my output in it.

xterm -e timeout --signal=SIGINT 5 airodump-ng $Interface -w $myfile