| @@ -29,9 +29,10 @@ class Redes_wifi extends Command | |||||
| */ | */ | ||||
| public function handle() | public function handle() | ||||
| { | { | ||||
| //$this->getProfilesRegex(); | |||||
| $essid = $this->argument('essid'); | $essid = $this->argument('essid'); | ||||
| $profiles = $this->getProfiles(); | |||||
| //$profiles = $this->getProfiles(); | |||||
| $profiles = $this->getProfilesRegex(); | |||||
| if (isset($essid) && (!$this->option('list'))) { | if (isset($essid) && (!$this->option('list'))) { | ||||
| $this->line("[{$essid}] ".$this->getPassword($essid)); | $this->line("[{$essid}] ".$this->getPassword($essid)); | ||||
| return 0; | return 0; | ||||
| @@ -46,9 +47,11 @@ class Redes_wifi extends Command | |||||
| public function getProfilesRegex() | public function getProfilesRegex() | ||||
| { | { | ||||
| $parse = file_get_contents('profiles.txt'); | |||||
| preg_match("/: \s*(.*)/", $parse, $profiles); | |||||
| dd($profiles); | |||||
| $result = Process::run('netsh wlan show profile'); | |||||
| $salidaprofiles = $result->output(); | |||||
| //$salidaprofiles = file_get_contents('profiles.txt'); | |||||
| preg_match_all("/: \s*(.*)/", $salidaprofiles, $profiles); | |||||
| return $profiles[1]; | |||||
| } | } | ||||
| public function getProfiles() | public function getProfiles() | ||||
| { | { | ||||