private void button1_Click(object sender, EventArgs e) { string ownername = textBox1.Text; string ownerpass = textBox2.Text; StreamReader sr1 = new StreamReader("users.bin"); string oldusers = sr1.ReadToEnd(); sr1.Close(); StreamReader sr2 = new StreamReader("passwords.bin"); string oldpasses = sr2.ReadToEnd(); sr2.Close(); StreamWriter sw = new StreamWriter("owner.bin"); sw.Write(ownername); sw.Close(); StreamWriter sw2 = new StreamWriter("users.bin"); sw2.Write(oldusers + ownername + ":"); sw2.Close(); StreamWriter sw3 = new StreamWriter("passwords.bin"); Functions ObsidFunc = new Functions(); string passhash = ObsidFunc.md5calc(ownerpass); sw3.Write(oldpasses + passhash + ":"); sw3.Close(); Form1 mainForm = new Form1(); mainForm.setOwner(); this.Hide(); }
static void Main(string[] args) { string channel = args[0]; string rnick = args[1]; string rmsg = args[2]; try { string query = rmsg.Remove(0, 5); ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions(); string md5encrypt = ObsidFunc.md5calc(query.ToString()).ToLower(); string response = "PRIVMSG " + channel + " :" + md5encrypt; Console.WriteLine(response); } catch (Exception ex) { Console.WriteLine("PRIVMSG " + channel + " :" + ex.ToString()); } }
public void startUserList() { StreamWriter sw1 = new StreamWriter("users.bin"); sw1.Write(textBox4.Text + ":"); sw1.Close(); Functions ObsidFunc = new Functions(); StreamWriter sw2 = new StreamWriter("passwords.bin"); sw2.Write(ObsidFunc.md5calc(textBox6.Text) + ":"); sw2.Close(); StreamWriter sw3 = new StreamWriter("registers.bin"); sw3.Write("|"); sw3.Close(); StreamWriter sw4 = new StreamWriter(".activeusers"); sw4.Close(); }
public void generateMD5message() { string query = rmsg.Remove(0, 5); try { ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions(); string md5encrypt = ObsidFunc.md5calc(query.ToString()).ToLower(); string response = "PRIVMSG " + channel + " :" + md5encrypt; send(response); } catch (Exception ex) { send("PRIVMSG " + channel + " :Something went wrong: " + ex); } }