Skip to content

Commit 6dc3d17

Browse files
committed
updates to the new pw generation tool
1 parent a654d44 commit 6dc3d17

File tree

2 files changed

+3868
-3720
lines changed

2 files changed

+3868
-3720
lines changed

dic_make/dic_make.cpp

+16-9
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int main (int argc, char **argv) {
3232
// first few, are 'special'. These are the most important, since we have some formats
3333
// that only use a very FEW value.
3434
char *pass;
35-
unsigned tot=0, i, len=4, cnt=0;
35+
unsigned tot=0, i, len, cnt=0;
3636

3737
unsigned long init[4]={0x123, 0x234, 0x345, 0x456}, length=4;
3838
init_by_array(init, length);
@@ -49,23 +49,26 @@ int main (int argc, char **argv) {
4949
starts[i] = val;
5050
}
5151

52-
// grow from 4 to 54
53-
for (i = 0; i < 10; ++i) {
54-
pass = gen_next(len, tot);
52+
// grow from 5 to 85
53+
for (i = 0; i < 16; ++i) {
54+
pass = gen_next(i*5+5, tot);
5555
print_if_meet_criteria(pass, cnt);
56-
len += 5;
5756
}
5857
print_if_meet_criteria("", cnt);
5958
pass = gen_next(9, tot);
6059
print_if_meet_criteria(pass, cnt);
6160
print_if_meet_criteria("p", cnt);
62-
63-
// zig-zag lengths 4-56 9-45. ....
61+
pass = gen_next(16, tot);
62+
print_if_meet_criteria("123", cnt);
63+
pass = gen_next(18, tot);
64+
print_if_meet_criteria(pass, cnt);
65+
print_if_meet_criteria("32", cnt);
66+
// zig-zag lengths 4-125 9-120. ....
6467
len = 4;
65-
for (i = 0; i < 10; ++i) {
68+
for (i = 0; i < 15; ++i) {
6669
pass = gen_next(len, tot);
6770
print_if_meet_criteria(pass, cnt);
68-
pass = gen_next(60-len, tot);
71+
pass = gen_next(129-len, tot);
6972
print_if_meet_criteria(pass, cnt);
7073
len += 5;
7174
}
@@ -74,6 +77,10 @@ int main (int argc, char **argv) {
7477
pass = gen_next(len, tot);
7578
print_if_meet_criteria(pass, cnt);
7679
}
80+
for (i = 12; i < 134; i++) {
81+
pass = gen_next(i, tot);
82+
print_if_meet_criteria(pass, cnt);
83+
}
7784
for (i = 0; i < 400; i+=3) {
7885
pass = gen_next(4+rnd(130), tot);
7986
print_if_meet_criteria(pass, cnt);

0 commit comments

Comments
 (0)