Post: Got a little bored so threw this together.
05-03-2012, 06:55 AM #1
Pichu
RIP PICHU.
(adsbygoogle = window.adsbygoogle || []).push({}); Essentially you take a string and select whether you want MD5 or SHA1. You select whether you want hyphens or not. You select how many times you want it to be hashed. It then hashes that amount of times and shows a list including last hashed string.

It's not a completed source as I'm only about 45 minutes into it, with design.

Tired as hell and probably won't complete because its a time passing throw together project but essentially what needs to be added is a streamwriter and it still needs to have the events fixed for removing the hyphens properly as with the second hashing the value is different with or without hyphens due to the fact that they get hashed with it and produce a different value.

It's not a hard fix but may take about 5-10 minutes to figure out.

(Not the cleanest source as I am tired as f*ck).

You must login or register to view this content.

    using System;using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;


namespace Hash_Developer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
SHA1CryptoServiceProvider sha = new SHA1CryptoServiceProvider();
UTF32Encoding utf = new UTF32Encoding();
private void Form1_Load(object sender, EventArgs e)
{


}
int a = 0;
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "Hash List From Text (Total = " + Convert.ToString(numericUpDown1.Value) + ")";
richTextBox1.Text = "";
int b = Convert.ToInt32(numericUpDown1.Value);
string uno = textBox1.Text;
if (!checkBox1.Checked & !checkBox2.Checked) { a = 0; }
if (checkBox1.Checked & !checkBox2.Checked) { a = 1; }
if (!checkBox1.Checked & checkBox2.Checked) { a = 2; }
if (checkBox1.Checked & checkBox2.Checked) { a = 3; }
switch (a)
{
case 0: { MessageBox.Show("Please Select An Option", "Hey"); break; }
case 1:
{
textBox3.Text = BitConverter.ToString(md5.ComputeHash(utf.GetBytes(uno)));
if (!checkBox3.Checked)
{
cleaner();
}
richTextBox1.Text = textBox3.Text + "\n" + richTextBox1.Text;
for (int check = 1; check < b; check++)
{
textBox3.Text = BitConverter.ToString(md5.ComputeHash(utf.GetBytes(textBox3.Text)));
if (!checkBox3.Checked)
{
cleaner();
}
richTextBox1.Text = textBox3.Text + "\n" + richTextBox1.Text;
}
break;
}
case 2:
{
textBox3.Text = BitConverter.ToString(sha.ComputeHash(utf.GetBytes(uno)));
if (!checkBox3.Checked)
{
cleaner();
}
richTextBox1.Text = textBox3.Text + "\n" + richTextBox1.Text;
for (int check = 1; check < b; check++)
{
textBox3.Text = BitConverter.ToString(sha.ComputeHash(utf.GetBytes(textBox3.Text)));
if (!checkBox3.Checked)
{
cleaner();
}
richTextBox1.Text = textBox3.Text + "\n" + richTextBox1.Text;
}
break;
}
case 3:
{
textBox3.Text = BitConverter.ToString(md5.ComputeHash(utf.GetBytes(BitConverter.ToString((sha.ComputeHash(utf.GetBytes(uno)))))));
if (!checkBox3.Checked)
{
cleaner();
}
richTextBox1.Text = textBox3.Text + "\n" + richTextBox1.Text;
for (int check = 1; check < b; check++)
{
textBox3.Text = BitConverter.ToString(md5.ComputeHash(utf.GetBytes(BitConverter.ToString((sha.ComputeHash(utf.GetBytes(textBox3.Text)))))));
if (!checkBox3.Checked)
{
cleaner();
}
richTextBox1.Text = textBox3.Text + "\n" + richTextBox1.Text;
}
break; }
}
}
private void timer1_Tick(object sender, EventArgs e)
{
if (checkBox1.Checked || checkBox2.Checked)
{
numericUpDown1.Enabled = true; button1.Enabled = true;
}
else { numericUpDown1.Enabled = false; button1.Enabled = false; }
}
public void cleaner()
{
StringBuilder sb = new StringBuilder();
var lastWasInvalid = false;
foreach (char c in textBox3.Text)
{
if (char.IsLetterOrDigit(c))
{
sb.Append(c);
lastWasInvalid = false;
}
else
{
if (!lastWasInvalid)
sb.Append("");
lastWasInvalid = true;
}
}
textBox3.Text = sb.ToString().ToLowerInvariant().Trim();
}
}
}


(adsbygoogle = window.adsbygoogle || []).push({});
05-06-2012, 03:55 PM #2
Good work so far sublimity. I would like to see the finished project when you are done.
05-06-2012, 04:29 PM #3
Pichu
RIP PICHU.
Originally posted by MagicalMonkey View Post
Good work so far sublimity. I would like to see the finished project when you are done.


I probably won't finish it, although if I do ever load it up, I figure about half an hour more time added and it's done.
05-06-2012, 07:58 PM #4
LuckyAiden
Samurai Poster
What does this do ? Drack
05-06-2012, 08:27 PM #5
Ameht!
Dark Knight
Originally posted by Aiiden View Post
What does this do ? Drack


HashMaker , I'm guessing it makes Hash's:derp:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo