__construct() public method

public __construct ( $startInOld, $startInNew, $size )
Exemplo n.º 1
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  * @param $cardinality
  */
 public function __construct($password, $begin, $end, $token, $cardinality = null)
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'bruteforce';
     // Cardinality can be injected to support full password cardinality instead of token.
     $this->cardinality = $cardinality;
 }
Exemplo n.º 2
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  * @param array $params
  *   Array with keys: day, month, year, separator.
  */
 public function __construct($password, $begin, $end, $token, $params)
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'date';
     $this->day = $params['day'];
     $this->month = $params['month'];
     $this->year = $params['year'];
     $this->separator = $params['separator'];
 }
Exemplo n.º 3
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  * @param array $params
  */
 public function __construct($password, $begin, $end, $token, $params = array())
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'sequence';
     if (!empty($params)) {
         $this->sequenceName = isset($params['sequenceName']) ? $params['sequenceName'] : null;
         $this->sequenceSpace = isset($params['sequenceSpace']) ? $params['sequenceSpace'] : null;
         $this->ascending = isset($params['ascending']) ? $params['ascending'] : null;
     }
 }
Exemplo n.º 4
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  * @param array $params
  */
 public function __construct($password, $begin, $end, $token, $params = array())
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'dictionary';
     if (!empty($params)) {
         $this->dictionaryName = isset($params['dictionary_name']) ? $params['dictionary_name'] : null;
         $this->matchedWord = isset($params['matched_word']) ? $params['matched_word'] : null;
         $this->rank = isset($params['rank']) ? $params['rank'] : null;
     }
 }
Exemplo n.º 5
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  * @param array $params
  */
 public function __construct($password, $begin, $end, $token, $params = array())
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'spatial';
     $this->graph = $params['graph'];
     if (!empty($params)) {
         $this->shiftedCount = isset($params['shifted_count']) ? $params['shifted_count'] : null;
         $this->turns = isset($params['turns']) ? $params['turns'] : null;
     }
     // Preset properties since adjacency graph is constant for qwerty keyboard and keypad.
     $this->keyboardStartingPos = 94;
     $this->keypadStartingPos = 15;
     $this->keyboardAvgDegree = 432 / 94;
     $this->keypadAvgDegree = 76 / 15;
 }
Exemplo n.º 6
0
 /**
  * Construct the Exact rule.
  *
  * @param string   $outputFormat  The output format for the rule.
  * @param mixed[]  $match         Exact match required from the media type.
  * @param string[] $ignoredFields Fields to be ignored in the match.
  */
 public function __construct(string $outputFormat, array $match, array $ignoredFields = ['q_factor'])
 {
     parent::__construct($outputFormat, $match);
     $this->ignoredFields = $ignoredFields;
 }
Exemplo n.º 7
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  */
 public function __construct($password, $begin, $end, $token)
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'digit';
 }
Exemplo n.º 8
0
 public function __construct($mid)
 {
     parent::__construct($mid);
     $this->hash_botocs = get_alt_col('leegmgr_matches', 'mid', $mid, 'hash');
 }
Exemplo n.º 9
0
 /**
  * @param $password
  * @param $begin
  * @param $end
  * @param $token
  */
 public function __construct($password, $begin, $end, $token, $char)
 {
     parent::__construct($password, $begin, $end, $token);
     $this->pattern = 'repeat';
     $this->repeatedChar = $char;
 }