Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
citizen-VM | bcc5aa1717 | ||
citizen-VM | 7f76188b81 | ||
citizen-VM | 048c46567f |
|
@ -33,6 +33,12 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="MMLib.Core, Version=1.0.5305.36249, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\MMLib.Extensions.1.0.10.13\lib\MMLib.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MMLib.Extensions, Version=1.0.2.6, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\MMLib.Extensions.1.0.10.13\lib\MMLib.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
@ -66,6 +72,7 @@
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<None Include="packages.config" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
this.textBox12 = new System.Windows.Forms.TextBox();
|
this.textBox12 = new System.Windows.Forms.TextBox();
|
||||||
this.label14 = new System.Windows.Forms.Label();
|
this.label14 = new System.Windows.Forms.Label();
|
||||||
this.textBox13 = new System.Windows.Forms.TextBox();
|
this.textBox13 = new System.Windows.Forms.TextBox();
|
||||||
|
this.button5 = new System.Windows.Forms.Button();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
|
@ -370,12 +371,23 @@
|
||||||
this.textBox13.Size = new System.Drawing.Size(313, 20);
|
this.textBox13.Size = new System.Drawing.Size(313, 20);
|
||||||
this.textBox13.TabIndex = 513;
|
this.textBox13.TabIndex = 513;
|
||||||
//
|
//
|
||||||
|
// button5
|
||||||
|
//
|
||||||
|
this.button5.Location = new System.Drawing.Point(230, 461);
|
||||||
|
this.button5.Name = "button5";
|
||||||
|
this.button5.Size = new System.Drawing.Size(95, 23);
|
||||||
|
this.button5.TabIndex = 517;
|
||||||
|
this.button5.Text = "cp for decryption";
|
||||||
|
this.button5.UseVisualStyleBackColor = true;
|
||||||
|
this.button5.Click += new System.EventHandler(this.button5_Click);
|
||||||
|
//
|
||||||
// main_form
|
// main_form
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.AutoSize = true;
|
this.AutoSize = true;
|
||||||
this.ClientSize = new System.Drawing.Size(1140, 491);
|
this.ClientSize = new System.Drawing.Size(1140, 491);
|
||||||
|
this.Controls.Add(this.button5);
|
||||||
this.Controls.Add(this.label13);
|
this.Controls.Add(this.label13);
|
||||||
this.Controls.Add(this.textBox12);
|
this.Controls.Add(this.textBox12);
|
||||||
this.Controls.Add(this.label14);
|
this.Controls.Add(this.label14);
|
||||||
|
@ -457,6 +469,7 @@
|
||||||
private System.Windows.Forms.TextBox textBox12;
|
private System.Windows.Forms.TextBox textBox12;
|
||||||
private System.Windows.Forms.Label label14;
|
private System.Windows.Forms.Label label14;
|
||||||
private System.Windows.Forms.TextBox textBox13;
|
private System.Windows.Forms.TextBox textBox13;
|
||||||
|
private System.Windows.Forms.Button button5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
20
main_form.cs
20
main_form.cs
|
@ -36,6 +36,7 @@ namespace KRY_0x01_ng
|
||||||
string introduce_chaos(string str)
|
string introduce_chaos(string str)
|
||||||
{
|
{
|
||||||
string nustr = Regex.Replace(str, " ", "SPACEBRO");
|
string nustr = Regex.Replace(str, " ", "SPACEBRO");
|
||||||
|
nustr = MMLib.Extensions.StringExtensions.RemoveDiacritics(nustr);
|
||||||
nustr = Regex.Replace(nustr, "W", "V");
|
nustr = Regex.Replace(nustr, "W", "V");
|
||||||
nustr = Regex.Replace(nustr, ",", "COMMABRO");
|
nustr = Regex.Replace(nustr, ",", "COMMABRO");
|
||||||
return nustr.Replace(".", "DOTBRO");
|
return nustr.Replace(".", "DOTBRO");
|
||||||
|
@ -89,7 +90,8 @@ namespace KRY_0x01_ng
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
string str_to_check = String.Join("", tb_k.Text.ToUpper().Distinct());
|
string str_to_check = MMLib.Extensions.StringExtensions.RemoveDiacritics(tb_k.Text.ToUpper());
|
||||||
|
str_to_check = String.Join("", str_to_check.Distinct());
|
||||||
if (str_to_check.Length < 9)
|
if (str_to_check.Length < 9)
|
||||||
{
|
{
|
||||||
/* because why not, 8 is still lame */
|
/* because why not, 8 is still lame */
|
||||||
|
@ -102,10 +104,10 @@ namespace KRY_0x01_ng
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Match match = Regex.Match(str_to_check, @"\d|\s+");
|
Match match = Regex.Match(str_to_check, @"\d|\s+|W");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Only alphabetic characters are allowed.\nCheck the key for numbers, symbols or tab whitespace and remove them before continuing.", "Error: invalid chars in key");
|
MessageBox.Show("Only alphabetic characters (with the exception of 'W') are allowed.\nCheck the key for numbers, symbols or tab whitespace and remove them before continuing.", "Error: invalid chars in key");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,6 +167,7 @@ namespace KRY_0x01_ng
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string msg = introduce_chaos(tb_m.Text.ToUpper());
|
string msg = introduce_chaos(tb_m.Text.ToUpper());
|
||||||
|
msg = MMLib.Extensions.StringExtensions.RemoveDiacritics(msg);
|
||||||
Match match = Regex.Match(msg, @"\d|\s+");
|
Match match = Regex.Match(msg, @"\d|\s+");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
|
@ -183,6 +186,7 @@ namespace KRY_0x01_ng
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
string msg = tb_m.Text.ToUpper();
|
string msg = tb_m.Text.ToUpper();
|
||||||
|
msg = MMLib.Extensions.StringExtensions.RemoveDiacritics(msg);
|
||||||
Match match = Regex.Match(msg, @"\d|\s+|W");
|
Match match = Regex.Match(msg, @"\d|\s+|W");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
|
@ -381,5 +385,15 @@ namespace KRY_0x01_ng
|
||||||
/* decrypt */
|
/* decrypt */
|
||||||
decrypt();
|
decrypt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void button5_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
/* copy for decryption (tb7 --> tb9) */
|
||||||
|
string cryptmsg = textBox7.Text.Trim();
|
||||||
|
cryptmsg = String.Join("", cryptmsg);
|
||||||
|
cryptmsg = Regex.Replace(cryptmsg, @"\s+|", "");
|
||||||
|
textBox9.Text = cryptmsg;
|
||||||
|
MessageBox.Show("great success","cryptmsg has been copied");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="MMLib.Extensions" version="1.0.10.13" targetFramework="net48" />
|
||||||
|
</packages>
|
Loading…
Reference in New Issue