parent
cff1ab498e
commit
27a73f94eb
15
main_form.cs
15
main_form.cs
|
@ -168,27 +168,27 @@ namespace KRY_0x01_ng
|
|||
return;
|
||||
}
|
||||
|
||||
void check_cryptmessage(TextBox tb_m)
|
||||
bool check_cryptmessage(TextBox tb_m)
|
||||
{
|
||||
if (tb_m.Text.Length == 0)
|
||||
{
|
||||
MessageBox.Show("Empty message, nothing to do.", "Warning");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
string msg = tb_m.Text.ToUpper();
|
||||
Match match = Regex.Match(msg, @"\d|\s+|W");
|
||||
if (match.Success)
|
||||
{
|
||||
MessageBox.Show("Only alphabetic characters (with the exception of W) are allowed.\nCheck the cryptmessage for numbers, symbols or tab whitespace and remove them before continuing.", "Error");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (tb_m.Text.Length % 2 != 0)
|
||||
{
|
||||
MessageBox.Show("This pretty sure can't be a message I can deal with (uneven number of characters).", "Error");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
textBox9.Text = msg;
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
string msg_hack_up(string msg)
|
||||
|
@ -297,7 +297,10 @@ namespace KRY_0x01_ng
|
|||
return;
|
||||
}
|
||||
fill_array_table();
|
||||
check_cryptmessage(textBox9);
|
||||
if (!check_cryptmessage(textBox9))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string message = "";
|
||||
string crm = textBox9.Text;
|
||||
|
|
Loading…
Reference in New Issue