|
|
@@ -0,0 +1,57 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
namespace App\Commands; |
|
|
|
|
|
|
|
use Illuminate\Console\Scheduling\Schedule; |
|
|
|
use LaravelZero\Framework\Commands\Command; |
|
|
|
use Illuminate\Support\Facades\Process; |
|
|
|
|
|
|
|
class Detalle_wifi extends Command |
|
|
|
{ |
|
|
|
/** |
|
|
|
* The signature of the command. |
|
|
|
* |
|
|
|
* @var string |
|
|
|
*/ |
|
|
|
protected $signature = 'detalle_wifi'; |
|
|
|
|
|
|
|
/** |
|
|
|
* The description of the command. |
|
|
|
* |
|
|
|
* @var string |
|
|
|
*/ |
|
|
|
protected $description = 'Este comando te dara una descripcion detallada de la red'; |
|
|
|
|
|
|
|
/** |
|
|
|
* Execute the console command. |
|
|
|
* |
|
|
|
* @return mixed |
|
|
|
*/ |
|
|
|
//lo que debo obtener con la red del parceo es lo siguiente: |
|
|
|
|
|
|
|
//1-. nombre de la red |
|
|
|
//2-. tipo de encriptacion |
|
|
|
//3-. canal en el que esta |
|
|
|
//4-. Frecuencia |
|
|
|
public function handle() |
|
|
|
{ |
|
|
|
$result = Process::run('netsh wlan show networks mode=Bssid'); |
|
|
|
$salidascanwifi = $result->output(); |
|
|
|
$parsescanwifi = explode(" ----------------- ", $salidascanwifi); |
|
|
|
var_dump($salidascanwifi); |
|
|
|
$parsescanwifi = end($parsescanwifi); |
|
|
|
$parsescanwifi = explode("\n", trim($parsescanwifi, "\n\r")); |
|
|
|
$scanwifi = []; |
|
|
|
return $scanwifi; |
|
|
|
} |
|
|
|
/** |
|
|
|
* Define the command's schedule. |
|
|
|
* |
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule |
|
|
|
* @return void |
|
|
|
*/ |
|
|
|
public function schedule(Schedule $schedule): void |
|
|
|
{ |
|
|
|
// $schedule->command(static::class)->everyMinute(); |
|
|
|
} |
|
|
|
} |