Se colocaran ejercios para practicar de codigobit
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB

  1. <?php
  2. namespace App\Commands;
  3. use Illuminate\Console\Scheduling\Schedule;
  4. use LaravelZero\Framework\Commands\Command;
  5. use Netson\L4W\L4W;
  6. class Redes_wifi extends Command
  7. {
  8. /**
  9. * The signature of the command.
  10. *
  11. * @var string
  12. */
  13. protected $signature = 'app:redes_wifi';
  14. /**
  15. * The description of the command.
  16. *
  17. * @var string
  18. */
  19. protected $description = 'Command description';
  20. /**
  21. * Execute the console command.
  22. *
  23. * @return mixed
  24. */
  25. public function handle()
  26. {
  27. $l4w = new L4W();
  28. $networks = $l4w->scan();
  29. foreach ($networks as $network) {
  30. echo $network->name . '<br>';
  31. echo $network->strength . '<br>';
  32. // Otros datos disponibles: $network->mac, $network->encryptionType, $network->channel, etc.
  33. echo '<br>';
  34. }
  35. }
  36. /**
  37. * Define the command's schedule.
  38. *
  39. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  40. * @return void
  41. */
  42. public function schedule(Schedule $schedule): void
  43. {
  44. // $schedule->command(static::class)->everyMinute();
  45. }
  46. }