added fix preventing input of literal zero
* ...as it is the termination character, by which we can tell the end of a message
This commit is contained in:
parent
c82f88393d
commit
0fcec4d971
1
main_form.Designer.cs
generated
1
main_form.Designer.cs
generated
@ -76,6 +76,7 @@
|
||||
this.textBox1putm.Name = "textBox1putm";
|
||||
this.textBox1putm.Size = new System.Drawing.Size(342, 66);
|
||||
this.textBox1putm.TabIndex = 3;
|
||||
this.textBox1putm.TextChanged += new System.EventHandler(this.textBox1putm_TextChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
|
15
main_form.cs
15
main_form.cs
@ -187,7 +187,6 @@ namespace KRY_0x02
|
||||
//{
|
||||
// output = main_output;
|
||||
//}
|
||||
MessageBox.Show("success!","done");
|
||||
return output;
|
||||
}
|
||||
}
|
||||
@ -218,6 +217,7 @@ namespace KRY_0x02
|
||||
do_a_stego do_A_Stego = new do_a_stego();
|
||||
Bitmap b = new Bitmap(pictureBox1.Image);
|
||||
textBox2getm.Text = do_A_Stego.gimme(b);
|
||||
MessageBox.Show("success!", "done");
|
||||
}
|
||||
|
||||
|
||||
@ -315,5 +315,18 @@ namespace KRY_0x02
|
||||
MessageBox.Show($"saved to {name}", "gj, file saved!");
|
||||
}
|
||||
}
|
||||
|
||||
private void textBox1putm_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Regex.IsMatch(textBox1putm.Text, "0"))
|
||||
{
|
||||
textBox1putm.BackColor = Color.PaleVioletRed;
|
||||
MessageBox.Show("null character is forbidden, sorry..\nmeaning it's going to be replaced", "just a note");
|
||||
textBox1putm.Text = Regex.Replace(textBox1putm.Text, "0", "nullchar");
|
||||
textBox1putm.Select(textBox1putm.Text.Length, 0);
|
||||
textBox1putm.BackColor = Color.White;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user