Post: Custom User Verify Program
01-02-2013, 12:33 AM #1
Pichu
RIP PICHU.
(adsbygoogle = window.adsbygoogle || []).push({}); You must login or register to view this content.

Just something I quickly wrote up. Basic programming, sadly it's technique is horrible as I could have done a lot better.

This is essentially scrap code.

    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.Net;
using System.Security.Cryptography;


namespace Program_Verify
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


string UserLocalName;
string InvalidCharacters = " _-ACEGIKMOQSUWY";
bool InvalidChar = false;
string IDBuilder = "";
string NewID = "";
int max = 0;
string CustomSerial = "";
private void Form1_Load(object sender, EventArgs e)
{
UserLocalName = System.Environment.MachineName.ToString();
MD5CryptoServiceProvider Md5 = new MD5CryptoServiceProvider();
UTF32Encoding UTF32 = new UTF32Encoding();
string HashRun1 = BitConverter.ToString(Md5.ComputeHash(UTF32.GetBytes(UserLocalName)));
foreach (char a in HashRun1)
{
foreach (char check in InvalidCharacters)
{
if (Char.ToUpper(a) == check)
{
InvalidChar = true;
}
}
if (InvalidChar == false)
{
IDBuilder += a;
}
InvalidChar = false;
}
foreach (char i in IDBuilder)
{
if (max < 2)
{
NewID += Convert.ToInt32(i);
}
max++;
}
max = 0;
label3.Text += (Convert.ToInt32(NewID)*33).ToString();
string Serial = (Convert.ToInt32(NewID) * 33).ToString() + System.Environment.MachineName;
string SerialHash = BitConverter.ToString(Md5.ComputeHash(UTF32.GetBytes(Serial)));
SerialHash += HashRun1;
foreach (char a in SerialHash)
{
foreach (char check in InvalidCharacters)
{
if (Char.ToUpper(a) == check)
{
InvalidChar = true;
}
}
if (InvalidChar == false)
{
CustomSerial += a;
}
InvalidChar = false;
}
int DashAdder = 0;
foreach (char i in CustomSerial)
{
if (max < 24)
{
textBox2.Text += i;
if (DashAdder == 2 && max < 23)
{
textBox2.Text += "-";
DashAdder = -1;
}
}
max++;
DashAdder++;
}
}
}
}


(adsbygoogle = window.adsbygoogle || []).push({});
01-02-2013, 09:24 AM #2
C+, c++, c#, vb.net?
01-02-2013, 04:47 PM #3
Pichu
RIP PICHU.
Originally posted by T View Post
C+, c++, c#, vb.net?


C# obviously.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo