k = $k; $this->route = realpath($this->k->getRootDir().'/Net15/SecurityApplicationBundle/Resources/data'); } /** * @param $password * @return bool */ public function checkIfInWordList($password){ if($this->route === null || empty($this->route)) return false; if(!is_file($this->route.'/total_wordlist.json')) return false; $str = file_get_contents($this->route.'/total_wordlist.json'); $jsonArray = json_decode($str,true); foreach($jsonArray['passwords'] as $arr){ if($arr['password'] == $password) return true; } return false; } }