phoenix_password 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1807205fb4c33dec3f0d8f0f0a76a8e51546e6bc
4
- data.tar.gz: a69879613f2803b82a5d306c850a51217cae4585
3
+ metadata.gz: 9f6cab1c152e70c4126e91a443edc384f3dcada4
4
+ data.tar.gz: 30feab2c21937a24f8d5ec69954864457676ead0
5
5
  SHA512:
6
- metadata.gz: f7fdc581e56666262e5a50d23daf10a94eef66bf7eb343cb7fe4bbef1f523eacc323f02d2973de579477cc5b94efc8a906fcfe3f0f1b2d879b716c245a968098
7
- data.tar.gz: 90c74efe4204a8f229a5f5ccd6c19b625c1163e57e49c47b03d0e1e00ac02f94f576277df7027f9900bc35b668867792d0f890bfb3e28e80b2b77609a5aaf0d3
6
+ metadata.gz: db2b7725199dff32c9423d2d0009e88ca2621ea34143dd14155425cc8b1e9a4b74f75ae51b2f494f1659bdde5c57919c1a11d531004b632cef2c1c07df036ea2
7
+ data.tar.gz: 661f6981b00046b2f913766c8a1add26d68dc8c14f6db19eb8e77d0cbfe166b284785778805d73aeb74061ddea389c370351e319a4100ec866618acbe4454bf9
@@ -1,3 +1,3 @@
1
1
  class PhoenixPassword
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -115,15 +115,11 @@ class PhoenixPassword
115
115
  generate_combinations(data) do |combinations|
116
116
  combinations.each do |combination|
117
117
  if matching_check({:combination=>combination,:match_limit=>info[:match_limit]})
118
- if info[:piped]
119
- puts combination
120
- elsif !matching_file.nil?
121
- if data[:extra_chars].nil?
122
- matching_file.puts(combination)
123
- elsif data[:iteration] >= 1
118
+ if info[:piped]
119
+ puts combination
120
+ else
124
121
  matching_file.puts(combination)
125
- end
126
- end
122
+ end
127
123
  matching +=1
128
124
  end
129
125
  end
@@ -186,18 +182,13 @@ class PhoenixPassword
186
182
  combinations.each do |combination|
187
183
  unique_chars=check_uniqueness(combination,uniqueness)
188
184
  if unique_chars == combination.length-1
189
- puts combination if info[:piped]
190
- unless unique_file.nil?
191
- unless data[:extra_chars].nil?
192
- if data[:iteration] != 0
193
- unique_file.puts(combination)
194
- end
195
- else
196
- unique_file.puts(combination)
197
- end
185
+ if info[:piped]
186
+ puts combination
187
+ else
188
+ unique_file.puts(combination)
189
+ end
190
+ unique_combs= unique_combs+1
198
191
  end
199
- unique_combs= unique_combs+1
200
- end
201
192
  end
202
193
  end
203
194
  data[:iteration] +=1 if !data[:iteration].nil?
@@ -362,7 +353,7 @@ class PhoenixPassword
362
353
 
363
354
  previous_matches=0
364
355
  previous_mult=0
365
- i=0
356
+ i=1
366
357
  while i < (data[:cmb_length] -1)
367
358
  if i == (data[:match_limit]-1)
368
359
  previous_matches=base
@@ -373,7 +364,7 @@ class PhoenixPassword
373
364
  else
374
365
  temp_mult=previous_matches
375
366
  previous_matches=(base**(i-1))+(previous_mult*(base-1))+(previous_matches*(base-1))
376
- previous_mult=temp_mult*(base-1)
367
+ previous_mult=temp_mult
377
368
 
378
369
  end
379
370
  i+=1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phoenix_password
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spiros Avlonitis