Se colocaran ejercios para practicar de codigobit
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

58 Zeilen
1.4 KiB

  1. <?php
  2. namespace App\Commands;
  3. use Illuminate\Console\Scheduling\Schedule;
  4. use LaravelZero\Framework\Commands\Command;
  5. use Illuminate\Support\Facades\Process;
  6. class Detalle_wifi extends Command
  7. {
  8. /**
  9. * The signature of the command.
  10. *
  11. * @var string
  12. */
  13. protected $signature = 'detalle_wifi';
  14. /**
  15. * The description of the command.
  16. *
  17. * @var string
  18. */
  19. protected $description = 'Este comando te dara una descripcion detallada de la red';
  20. /**
  21. * Execute the console command.
  22. *
  23. * @return mixed
  24. */
  25. //lo que debo obtener con la red del parceo es lo siguiente:
  26. //1-. nombre de la red
  27. //2-. tipo de encriptacion
  28. //3-. canal en el que esta
  29. //4-. Frecuencia
  30. public function handle()
  31. {
  32. $result = Process::run('netsh wlan show networks mode=Bssid');
  33. $salidascanwifi = $result->output();
  34. $parsescanwifi = explode(" ----------------- ", $salidascanwifi);
  35. var_dump($salidascanwifi);
  36. $parsescanwifi = end($parsescanwifi);
  37. $parsescanwifi = explode("\n", trim($parsescanwifi, "\n\r"));
  38. $scanwifi = [];
  39. return $scanwifi;
  40. }
  41. /**
  42. * Define the command's schedule.
  43. *
  44. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  45. * @return void
  46. */
  47. public function schedule(Schedule $schedule): void
  48. {
  49. // $schedule->command(static::class)->everyMinute();
  50. }
  51. }