木头超级字典生成器拥有强大的功能,可以在字典生成器类软件中独占鳌头。其主要原因是其常规字典中首创“每位使用不同字符集”的特有功能,可以为密码字典的每一位指定生成字符集。
“每位使用不同字符集”使用动态控件,控件数组等技术。现将部份源码公布发下,与大家一起学习探讨。
public byte[] topselectchars = new byte[maxbit];
public byte[] topnomber = new byte[maxbit];
public byte[] topsmalltter = new byte[maxbit];
public byte[] topcletter = new byte[maxbit];
public byte[] topsiges = new byte[maxbit];
public byte[] topdiychars = new byte[maxbit];
public string[] topdiytext = new string[maxbit];
CheckBox[] selectchars=new CheckBox[maxbit];
CheckBox[] diychars=new CheckBox[maxbit];
CheckBox[] nomber=new CheckBox[maxbit];
CheckBox[] smalltter=new CheckBox[maxbit];
CheckBox[] cltter=new CheckBox[maxbit];
CheckBox[] siges=new CheckBox[maxbit];
RichTextBox[] diytext = new RichTextBox[maxbit];
private void bitdialog_Load(object sender, EventArgs e)
{ for (int i = 0; i < count; i++)//初始化控件
{
this.tabControl1.TabPages.Add("第" + (i + 1).ToString() + "位");
this.tabControl1.TabPages[i].Controls.Add(new CheckBox());
this.tabControl1.TabPages[i].Controls.Add(new CheckBox());
this.tabControl1.TabPages[i].Controls.Add(new CheckBox());
this.tabControl1.TabPages[i].Controls.Add(new CheckBox());
this.tabControl1.TabPages[i].Controls.Add(new CheckBox());
this.tabControl1.TabPages[i].Controls.Add(new CheckBox());
this.tabControl1.TabPages[i].Controls.Add(new RichTextBox());
this.tabControl1.TabPages[i].Controls[0].Size = new Size(84, 16);
this.tabControl1.TabPages[i].Controls[0].Location = new Point(3, 27);
this.tabControl1.TabPages[i].Controls[0].Text = "选择字符集";
this.tabControl1.TabPages[i].Controls[1].Size = new Size(84, 16);
this.tabControl1.TabPages[i].Controls[1].Location = new Point(3, 90);
this.tabControl1.TabPages[i].Controls[1].Text = "自定义字符";
this.tabControl1.TabPages[i].Controls[2].Size = new Size(42, 16);
this.tabControl1.TabPages[i].Controls[2].Location = new Point(93, 27);
this.tabControl1.TabPages[i].Controls[2].Text = "0-9";
this.tabControl1.TabPages[i].Controls[3].Size = new Size(42, 16);
this.tabControl1.TabPages[i].Controls[3].Location = new Point(161, 27);
this.tabControl1.TabPages[i].Controls[3].Text = "a-z";
this.tabControl1.TabPages[i].Controls[4].Size = new Size(42, 16);
this.tabControl1.TabPages[i].Controls[4].Location = new Point(234, 27);
this.tabControl1.TabPages[i].Controls[4].Text = "A-Z";
this.tabControl1.TabPages[i].Controls[5].Size = new Size(186, 16);
this.tabControl1.TabPages[i].Controls[5].Location = new Point(93, 58);
this.tabControl1.TabPages[i].Controls[5].Text = "~!@#$%^&*()_+|{}:\"<>?[];',./";
this.tabControl1.TabPages[i].Controls[6].Size = new Size(197, 73);
this.tabControl1.TabPages[i].Controls[6].Location = new Point(93, 90);
selectchars[i] = (CheckBox)this.tabControl1.TabPages[i].Controls[0];
diychars[i] = (CheckBox)this.tabControl1.TabPages[i].Controls[1];
nomber[i] = (CheckBox)this.tabControl1.TabPages[i].Controls[2];
smalltter[i] = (CheckBox)this.tabControl1.TabPages[i].Controls[3];
cltter[i] = (CheckBox)this.tabControl1.TabPages[i].Controls[4];
siges[i] = (CheckBox)this.tabControl1.TabPages[i].Controls[5];
diytext[i] = (RichTextBox)this.tabControl1.TabPages[i].Controls[6];
......
}
} |