Analysis and Evaluation of the Windows Event Log - Bill Buchanan
Analysis and Evaluation of the Windows Event Log - Bill Buchanan
Analysis and Evaluation of the Windows Event Log - Bill Buchanan
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
C:\Documents <strong>and</strong> Settings\Barrie\My ...\<strong>Windows</strong>Application7\Form1.cs<br />
}<br />
nFinnished at: " + myTime;<br />
}<br />
}<br />
}<br />
}<br />
}<br />
if (!over)<br />
{<br />
textBox3.Text += "Done! ";<br />
}<br />
}<br />
button1.Enabled = true;<br />
}<br />
}<br />
}<br />
string myTime = calcTime();<br />
textBox3.Text += "Key Found: " + myCh + "\r\<br />
over = true;<br />
break;<br />
}<br />
private void setTime()<br />
{<br />
label4.Text = Convert.ToString(DateTime.Now);<br />
label4.Refresh();<br />
}<br />
private string calcTime()<br />
{<br />
string myString = Convert.ToString(DateTime.Now);<br />
return (myString);<br />
}<br />
public static string ByteToString(byte[] buff)<br />
{<br />
string sbinary = "";<br />
for (int i = 0; i < buff.Length; i++)<br />
{<br />
sbinary += buff[i].ToString("X2"); // hex format<br />
}<br />
return (sbinary);<br />
}<br />
private string checker(string key)<br />
{<br />
string chkMessage = textBox2.Text;<br />
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();<br />
byte[] keyByte = encoding.GetBytes(key);<br />
HMACSHA1 hmac = new HMACSHA1(keyByte);<br />
byte[] messageBytes = encoding.GetBytes(chkMessage);<br />
byte[] hashmessage = hmac.ComputeHash(messageBytes);<br />
return (ByteToString(hashmessage));<br />
}<br />
5