phoenix_password 0.1.6 → 0.2.0
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 +4 -4
- data/README.md +11 -0
- data/lib/phoenix_password.rb +273 -24
- data/lib/phoenix_password/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62fc2d5162961619812bc5c72b25b055c27c5540
|
4
|
+
data.tar.gz: 68c1882f3687bdfe8163cedcbccfec2a0afe27ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0588f9c5423c5b85cac84ee81621c93e5812f9641b7ea801f1473ed014eb3d4060a071fa30bb63e5df431c59668846e7a722d70919c5d47e2adfc0f71e1cea6e'
|
7
|
+
data.tar.gz: 4ccba59a3c45a9a8cd79dc58d1b9243b1bfafab37b39d1f3d2116987497180a0867dd86ba3a0fdcf2d29d1274a3a8b688cba13fa0c96847807a48095e8fb9be2
|
data/README.md
CHANGED
@@ -99,6 +99,17 @@ When set to repeat only reappearing character combinations are generated xzx
|
|
99
99
|
When set to single only single character appearance combinations are generated xzy.
|
100
100
|
|
101
101
|
|
102
|
+
```ruby
|
103
|
+
:cap_limit=>1 or more (optional)
|
104
|
+
|
105
|
+
```
|
106
|
+
When used it ensures that each combination generated will contain only the amount of capital letters specified.
|
107
|
+
|
108
|
+
**Note that file size and combination estimates when using match_limit may not be accurate**
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
102
113
|
## Development
|
103
114
|
|
104
115
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/phoenix_password.rb
CHANGED
@@ -36,31 +36,51 @@ class PhoenixPassword
|
|
36
36
|
|
37
37
|
combinations=[]
|
38
38
|
if data[:extra_chars].nil? || data[:iteration] == 0
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
39
|
+
|
40
|
+
combinations.<<(combination.join())
|
41
|
+
if combination.last != characters.first
|
42
|
+
reverse_comb=combination.reverse
|
43
|
+
combinations.<<(reverse_comb.join())
|
44
|
+
reverse_comb.pop
|
45
|
+
reverse_compare=reverse_comb
|
46
|
+
reverse_comb=reverse_comb.join()
|
47
|
+
check_match= matching_check({:combination=>reverse_comb,:match_limit=>data[:match_limit],:cap_limit=>data[:cap_limit]})
|
48
|
+
characters.each do |char|
|
49
|
+
next if char == characters.first
|
50
|
+
if data[:type] == "unique"
|
47
51
|
combinations.<<("%s%s"%[reverse_comb,char])
|
52
|
+
else
|
53
|
+
if check_match
|
54
|
+
combinations.<<("%s%s"%[reverse_comb,char])
|
55
|
+
else
|
56
|
+
combinations.<<("%s%s"%[reverse_comb,char]) if char == reverse_compare.last
|
57
|
+
end
|
48
58
|
end
|
49
59
|
end
|
60
|
+
end
|
61
|
+
|
50
62
|
else
|
51
63
|
combinations << combination.join() if combination.include?(characters.last)
|
52
|
-
|
64
|
+
if combination.last != characters.first
|
53
65
|
reverse_comb=combination.reverse
|
54
66
|
reverse_comb.pop
|
67
|
+
reverse_compare=reverse_comb
|
55
68
|
reverse_comb=reverse_comb.join
|
56
|
-
|
57
|
-
|
58
|
-
|
69
|
+
if reverse_comb.include?(characters.last)
|
70
|
+
check_match= matching_check({:combination=>reverse_comb,:match_limit=>data[:match_limit],:cap_limit=>data[:cap_limit]}) if data[:type] == 'matching'
|
71
|
+
characters.each do |char|
|
72
|
+
if data[:type] == "unique"
|
73
|
+
combinations.<<("%s%s"%[reverse_comb,char])
|
74
|
+
elsif check_match
|
75
|
+
combinations.<<("%s%s"%[reverse_comb,char])
|
76
|
+
else
|
77
|
+
combinations.<<("%s%s"%[reverse_comb,char]) if char == reverse_compare.last
|
59
78
|
end
|
60
|
-
else
|
61
|
-
combinations.<<("%s%s"%[reverse_comb,characters.last])
|
62
79
|
end
|
80
|
+
else
|
81
|
+
combinations.<<("%s%s"%[reverse_comb,characters.last])
|
63
82
|
end
|
83
|
+
end
|
64
84
|
end
|
65
85
|
|
66
86
|
yield(combinations) if combinations.length >= 1
|
@@ -114,7 +134,7 @@ class PhoenixPassword
|
|
114
134
|
begin
|
115
135
|
generate_combinations(data) do |combinations|
|
116
136
|
combinations.each do |combination|
|
117
|
-
if matching_check({:combination=>combination,:match_limit=>info[:match_limit]})
|
137
|
+
if matching_check({:combination=>combination,:match_limit=>info[:match_limit],:cap_limit=>info[:cap_limit]})
|
118
138
|
if info[:piped]
|
119
139
|
puts combination
|
120
140
|
else
|
@@ -135,6 +155,10 @@ class PhoenixPassword
|
|
135
155
|
|
136
156
|
def self.matching_check(info)
|
137
157
|
combination=info[:combination]
|
158
|
+
if info[:cap_limit]
|
159
|
+
caps=combination.scan(/[A-Z]/)
|
160
|
+
return false if caps.length == 0 || caps.length > info[:cap_limit]
|
161
|
+
end
|
138
162
|
i=0
|
139
163
|
x=0
|
140
164
|
u=0
|
@@ -157,8 +181,8 @@ class PhoenixPassword
|
|
157
181
|
return true
|
158
182
|
end
|
159
183
|
|
160
|
-
def self.unique_combinations(info)
|
161
|
-
data={:characters=>info[:characters],:cmb_length=>info[:cmb_length],:type=>info[:type]}
|
184
|
+
def self.unique_combinations(info)
|
185
|
+
data={:characters=>info[:characters],:cmb_length=>info[:cmb_length],:type=>info[:type],:uniqueness_type=>info[:uniqueness_type]}
|
162
186
|
unless info[:extra_chars].nil?
|
163
187
|
data[:extra_chars]=info[:extra_chars]
|
164
188
|
end
|
@@ -180,7 +204,7 @@ class PhoenixPassword
|
|
180
204
|
begin
|
181
205
|
generate_combinations(data) do |combinations|
|
182
206
|
combinations.each do |combination|
|
183
|
-
unique_chars=check_uniqueness(combination,uniqueness)
|
207
|
+
unique_chars=check_uniqueness(combination,uniqueness,info[:cap_limit])
|
184
208
|
if unique_chars == combination.length-1
|
185
209
|
if info[:piped]
|
186
210
|
puts combination
|
@@ -204,7 +228,11 @@ class PhoenixPassword
|
|
204
228
|
return unique_combs
|
205
229
|
end
|
206
230
|
|
207
|
-
def self.check_uniqueness(combination,uniqueness)
|
231
|
+
def self.check_uniqueness(combination,uniqueness,cap_limit)
|
232
|
+
if cap_limit
|
233
|
+
caps=combination.scan(/[A-Z]/)
|
234
|
+
return 0 if caps.length == 0 || caps.length > cap_limit
|
235
|
+
end
|
208
236
|
i=0
|
209
237
|
unique_chars=0
|
210
238
|
chars_check=[]
|
@@ -287,7 +315,6 @@ class PhoenixPassword
|
|
287
315
|
old_matches=old_base*post_matches
|
288
316
|
base=data[:characters].length+data[:extra_chars].length
|
289
317
|
end
|
290
|
-
possible_combinations=base**data[:cmb_length]
|
291
318
|
previous_matches=0
|
292
319
|
i=0
|
293
320
|
|
@@ -304,6 +331,7 @@ class PhoenixPassword
|
|
304
331
|
matches=base*previous_matches
|
305
332
|
|
306
333
|
if data[:type]=='unique'
|
334
|
+
possible_combinations=base**data[:cmb_length]
|
307
335
|
if data[:uniqueness_type].nil?
|
308
336
|
return (possible_combinations-matches)-(old_combinations-old_matches) if !data[:extra_chars].nil?
|
309
337
|
return possible_combinations-matches
|
@@ -378,6 +406,214 @@ class PhoenixPassword
|
|
378
406
|
end
|
379
407
|
end
|
380
408
|
|
409
|
+
def self.cap_limit_matching(data)
|
410
|
+
cap_data={}
|
411
|
+
total_chars=data[:characters].join()
|
412
|
+
caps_matched= total_chars.scan(/[A-Z]/)
|
413
|
+
cap_data[:characters]=[]
|
414
|
+
data[:characters].each do |char|
|
415
|
+
next if caps_matched.include?(char)
|
416
|
+
cap_data[:characters].push(char)
|
417
|
+
end
|
418
|
+
base=cap_data[:characters].length
|
419
|
+
cap_matches=0
|
420
|
+
case data[:cmb_length]
|
421
|
+
when 3
|
422
|
+
cap_matches += base*2
|
423
|
+
when 4
|
424
|
+
cap_matches+=get_combinations({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1})*2
|
425
|
+
cap_matches+=(base**2)*2
|
426
|
+
else
|
427
|
+
cap_matches+=get_combinations({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1})*2
|
428
|
+
cap_matches+=(get_combinations({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-2})*base)*(data[:cmb_length]-2)
|
429
|
+
end
|
430
|
+
|
431
|
+
if !data[:extra_chars].nil?
|
432
|
+
all_chars=data[:characters]+data[:extra_chars]
|
433
|
+
new_cap_matches=cap_limit_matching({:cmb_length=>data[:cmb_length],:characters=>all_chars})
|
434
|
+
return new_cap_matches-(cap_matches*caps_matched.length)
|
435
|
+
else
|
436
|
+
return cap_matches*caps_matched.length
|
437
|
+
end
|
438
|
+
|
439
|
+
end
|
440
|
+
|
441
|
+
def self.cap_limit_matching_l(data)
|
442
|
+
cap_data={}
|
443
|
+
total_chars=data[:characters].join()
|
444
|
+
caps_matched= total_chars.scan(/[A-Z]/)
|
445
|
+
cap_data[:characters]=[]
|
446
|
+
data[:characters].each do |char|
|
447
|
+
next if caps_matched.include?(char)
|
448
|
+
cap_data[:characters].push(char)
|
449
|
+
end
|
450
|
+
base=cap_data[:characters].length
|
451
|
+
cap_matches=0
|
452
|
+
no_limit_matches=get_combinations({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1})
|
453
|
+
case data[:cmb_length]
|
454
|
+
when 3
|
455
|
+
cap_matches += base*2
|
456
|
+
when 4
|
457
|
+
cap_matches+=(no_limit_matches-get_above_limit({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1,:match_limit=>data[:match_limit]}))*2
|
458
|
+
cap_matches+=(base**2)*2
|
459
|
+
else
|
460
|
+
|
461
|
+
#XXA
|
462
|
+
cap_matches+=(no_limit_matches-get_above_limit({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1,:match_limit=>data[:match_limit]}))*2
|
463
|
+
no_limit_matches=get_combinations({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-2})
|
464
|
+
#XAX
|
465
|
+
cap_matches+=((no_limit_matches-get_above_limit({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-2,:match_limit=>data[:match_limit]}))*base)*2
|
466
|
+
x=data[:cmb_length]-4
|
467
|
+
if x == 1
|
468
|
+
cap_matches +=get_combinations({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-2})*base
|
469
|
+
elsif x == 2
|
470
|
+
grt_half_no_limit=get_combinations({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-3})
|
471
|
+
grt_half_limit =grt_half_no_limit-get_above_limit({:characters=>cap_data[:characters],:match_limit=>data[:match_limit],:cmb_length=>data[:cmb_length]-3})
|
472
|
+
cap_matches +=(((grt_half_limit*base**2)+(base*base**3))-(grt_half_no_limit*base))*2
|
473
|
+
else
|
474
|
+
#AXX
|
475
|
+
i=3
|
476
|
+
p=0
|
477
|
+
l=0
|
478
|
+
begin
|
479
|
+
grt_half=get_combinations({:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-(3+l)})
|
480
|
+
grt_half_limit =grt_half-get_above_limit({:characters=>cap_data[:characters],:match_limit=>data[:match_limit],:cmb_length=>data[:cmb_length]-(3+l)})
|
481
|
+
if i == 3
|
482
|
+
if data[:cmb_length] <=8
|
483
|
+
cap_matches +=(((grt_half_limit*base**2)+(base*base**(x+1)))-(grt_half*base))*2
|
484
|
+
else
|
485
|
+
cap_matches +=((grt_half_limit*((base**2)-base))+(base*base**(x+1)))*2
|
486
|
+
|
487
|
+
end
|
488
|
+
else
|
489
|
+
lsr_half=get_combinations({:characters=>cap_data[:characters],:cmb_length=>i-1})
|
490
|
+
lsr_half_limit=lsr_half-get_above_limit(:characters=>cap_data[:characters],:match_limit=>data[:match_limit],:cmb_length=>i-1)
|
491
|
+
cap_matches +=(((grt_half_limit*(base**(2+p)))+(lsr_half_limit*base**(x+1-p)))-(grt_half*lsr_half))*2
|
492
|
+
|
493
|
+
end
|
494
|
+
p+=1
|
495
|
+
l+=1
|
496
|
+
i+=1
|
497
|
+
end while i < (data[:cmb_length]/2.0).ceil
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
if x%2 == 1
|
502
|
+
no_limit_matches=get_combinations({:characters=>cap_data[:characters],:cmb_length=>x-(p-1)})
|
503
|
+
half_point=(((no_limit_matches-get_above_limit({:characters=>cap_data[:characters],:cmb_length=>x-(p-1),:match_limit=>data[:match_limit]})))*base**(x-(p-1)))*2
|
504
|
+
if data[:cmb_length] == 7
|
505
|
+
cap_matches+=half_point-((half_point/base))
|
506
|
+
else
|
507
|
+
half_no_limit=get_combinations(:characters=>cap_data[:characters],:cmb_length=>x-1)
|
508
|
+
half_no_limit_b=get_combinations(:characters=>cap_data[:characters],:cmb_length=>x-2)
|
509
|
+
|
510
|
+
if data[:cmb_length] >= 9 && data[:extra_chars].nil?
|
511
|
+
puts "!------Approximately less than------!"
|
512
|
+
end
|
513
|
+
cap_matches+=half_point-((half_point/base))
|
514
|
+
|
515
|
+
end
|
516
|
+
|
517
|
+
else
|
518
|
+
no_limit_matches_a=get_combinations({:characters=>cap_data[:characters],:cmb_length=>(x-l)+1})
|
519
|
+
greater_half=(((no_limit_matches_a-get_above_limit({:characters=>cap_data[:characters],:cmb_length=>(x-l)+1,:match_limit=>data[:match_limit]})))*base**(x-l))
|
520
|
+
no_limit_matches_b=get_combinations({:characters=>cap_data[:characters],:cmb_length=>(x-l)})
|
521
|
+
lesser_half=(((no_limit_matches_b-get_above_limit({:characters=>cap_data[:characters],:cmb_length=>(x-l),:match_limit=>data[:match_limit]})))*base**(x-l+1))
|
522
|
+
|
523
|
+
if data[:cmb_length] == 10 && data[:extra_chars].nil?
|
524
|
+
puts "!------Approximately less than------!"
|
525
|
+
elsif data[:cmb_length] == 12 && data[:extra_chars].nil?
|
526
|
+
puts "!------Approximately more than------!"
|
527
|
+
end
|
528
|
+
cap_matches+=((greater_half+lesser_half)-((no_limit_matches_a*no_limit_matches_b)-(no_limit_matches_b*base)))*2
|
529
|
+
end
|
530
|
+
|
531
|
+
end
|
532
|
+
|
533
|
+
end
|
534
|
+
|
535
|
+
if (cap_data[:characters].length <= 2 || data[:cmb_length] >= 13) && data[:extra_chars].nil?
|
536
|
+
puts "!!!----Inaccurate information----!!!"
|
537
|
+
end
|
538
|
+
|
539
|
+
if !data[:extra_chars].nil?
|
540
|
+
all_chars=data[:characters]+data[:extra_chars]
|
541
|
+
new_cap_matches=cap_limit_matching_l({:cmb_length=>data[:cmb_length],:characters=>all_chars,:match_limit=>data[:match_limit]})
|
542
|
+
return new_cap_matches-(cap_matches*caps_matched.length)
|
543
|
+
else
|
544
|
+
return cap_matches*caps_matched.length
|
545
|
+
end
|
546
|
+
end
|
547
|
+
|
548
|
+
def self.unique_cap_limit(data)
|
549
|
+
cap_data={}
|
550
|
+
total_chars=data[:characters].join()
|
551
|
+
caps_matched= total_chars.scan(/[A-Z]/)
|
552
|
+
cap_data[:characters]=[]
|
553
|
+
data[:characters].each do |char|
|
554
|
+
next if caps_matched.include?(char)
|
555
|
+
cap_data[:characters].push(char)
|
556
|
+
end
|
557
|
+
base=cap_data[:characters].length
|
558
|
+
unique_cap_limit=0
|
559
|
+
if data[:uniqueness_type] == 'single'
|
560
|
+
if data[:cmb_length] == 3
|
561
|
+
unique_cap_limit=(((base**2)-(base))*3)
|
562
|
+
else
|
563
|
+
previous_single=get_single_combs(:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1,:type=>"unique")
|
564
|
+
unique_cap_limit=previous_single*data[:cmb_length]
|
565
|
+
end
|
566
|
+
else
|
567
|
+
case data[:cmb_length]
|
568
|
+
when 3
|
569
|
+
if data[:uniqueness_type].nil?
|
570
|
+
unique_cap_limit=((base**2)*3)-(base*2)
|
571
|
+
else
|
572
|
+
unique_cap_limit=((base**2)*3)-(base*2)-(((base**2)-(base))*3)
|
573
|
+
end
|
574
|
+
when 4
|
575
|
+
previous_unique=get_combinations(:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1,:type=>"unique")
|
576
|
+
if data[:uniqueness_type].nil?
|
577
|
+
unique_cap_limit=(previous_unique*2)+((((base**2)-base)*base)*2)
|
578
|
+
else
|
579
|
+
previous_single=get_single_combs(:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1,:type=>"unique")
|
580
|
+
unique_cap_limit=(previous_unique*2)+((((base**2)-base)*base)*2)-(previous_single*data[:cmb_length])
|
581
|
+
end
|
582
|
+
else
|
583
|
+
previous_unique_a=get_combinations(:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1,:type=>"unique")
|
584
|
+
previous_unique_b=get_combinations(:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-2,:type=>"unique")
|
585
|
+
if data[:uniqueness_type].nil?
|
586
|
+
unique_cap_limit=(previous_unique_a*2)+((previous_unique_b*base)*(data[:cmb_length]-2))
|
587
|
+
else
|
588
|
+
previous_single=get_single_combs(:characters=>cap_data[:characters],:cmb_length=>data[:cmb_length]-1,:type=>"unique")
|
589
|
+
unique_cap_limit=(previous_unique_a*2)+((previous_unique_b*base)*(data[:cmb_length]-2))-(previous_single*data[:cmb_length])
|
590
|
+
end
|
591
|
+
end
|
592
|
+
end
|
593
|
+
|
594
|
+
if !data[:extra_chars].nil?
|
595
|
+
all_chars=data[:characters]+data[:extra_chars]
|
596
|
+
new_unique_cap_limit=unique_cap_limit({:cmb_length=>data[:cmb_length],:characters=>all_chars,:uniqueness_type=>data[:uniqueness_type]})
|
597
|
+
return new_unique_cap_limit-(unique_cap_limit*caps_matched.length)
|
598
|
+
else
|
599
|
+
return unique_cap_limit*caps_matched.length
|
600
|
+
end
|
601
|
+
|
602
|
+
end
|
603
|
+
|
604
|
+
def self.cap_limit_combs(data,x=0)
|
605
|
+
if data[:type] == "matching"
|
606
|
+
if !data[:match_limit].nil?
|
607
|
+
puts "Combinations and file size may vary when using match_limit" if x == 0
|
608
|
+
cap_limit_matching_l(data)
|
609
|
+
else
|
610
|
+
cap_limit_matching(data)
|
611
|
+
end
|
612
|
+
else
|
613
|
+
unique_cap_limit(data)
|
614
|
+
end
|
615
|
+
end
|
616
|
+
|
381
617
|
def self.get_size(data)
|
382
618
|
bytes=data[:combinations]*(data[:cmb_length]+1)
|
383
619
|
kilo_bytes=bytes/1000.0
|
@@ -394,7 +630,7 @@ class PhoenixPassword
|
|
394
630
|
end
|
395
631
|
return_sizes[key]=value if value > 0.01 && key != :bytes
|
396
632
|
end
|
397
|
-
yield(return_sizes)
|
633
|
+
yield(return_sizes) if block_given?
|
398
634
|
return return_sizes
|
399
635
|
end
|
400
636
|
|
@@ -426,22 +662,35 @@ class PhoenixPassword
|
|
426
662
|
if data[:file_append].nil? || !data[:file_append]
|
427
663
|
if data[:write_cmbs].nil?
|
428
664
|
poss_combs=get_combinations(data)
|
429
|
-
|
430
|
-
|
665
|
+
if !data[:match_limit].nil?
|
666
|
+
if !data[:cap_limit].nil?
|
667
|
+
poss_combs=cap_limit_combs(data)
|
668
|
+
else
|
669
|
+
poss_combs -= get_above_limit(data)
|
670
|
+
end
|
671
|
+
elsif !data[:cap_limit].nil?
|
672
|
+
poss_combs=cap_limit_combs(data)
|
431
673
|
end
|
432
|
-
matching_file_size=get_size({:cmb_length=>data[:cmb_length],:combinations=>poss_combs})
|
674
|
+
matching_file_size=get_size({:cmb_length=>data[:cmb_length],:combinations=>poss_combs})
|
433
675
|
else
|
434
676
|
poss_combs=0
|
435
677
|
matching_file_size={:bytes=>0,:kilo=>0,:mega=>0,:giga=>0,:tera=>0,:peta=>0}
|
436
678
|
dataB=data.clone
|
679
|
+
cmb_count=data[:write_cmbs].length if !data[:cap_limit].nil?
|
437
680
|
data[:write_cmbs].each do |n|
|
438
681
|
dataB[:cmb_length]=n
|
682
|
+
if data[:cap_limit].nil?
|
439
683
|
current_combs=get_combinations(dataB)
|
440
684
|
poss_combs +=current_combs
|
441
685
|
unless data[:match_limit].nil?
|
442
686
|
poss_combs -= get_above_limit(dataB)
|
443
687
|
current_combs -= get_above_limit(dataB)
|
444
688
|
end
|
689
|
+
else
|
690
|
+
current_combs=cap_limit_combs(dataB,cmb_count)
|
691
|
+
cmb_count -= 1
|
692
|
+
poss_combs +=cap_limit_combs(dataB,cmb_count)
|
693
|
+
end
|
445
694
|
get_size({:cmb_length=>n,:combinations=>current_combs})do |sizes|
|
446
695
|
sizes.each do |key,value|
|
447
696
|
matching_file_size[key] +=value
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phoenix_password
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spiros Avlonitis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|