Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.Web;
- using System.Net;
- using System.IO;
- using System.Net.NetworkInformation;
- using System.Management;
- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private String Do_REQ(String url) {
- String resp = null;
- HttpWebRequest WebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
- WebRequest.Method = "GET";
- HttpWebResponse myWebResponse = (HttpWebResponse)WebRequest.GetResponse();
- StreamReader Source = new StreamReader(myWebResponse.GetResponseStream());
- resp = Source.ReadToEnd();
- myWebResponse.Close();
- return resp;
- }
- public static string GetPCID()
- {
- try
- {
- string cpuInfo = String.Empty;
- string temp = String.Empty;
- ManagementClass mc = new ManagementClass("Win32_Processor");
- ManagementObjectCollection moc = mc.GetInstances();
- foreach (ManagementObject mo in moc)
- {
- if (cpuInfo == String.Empty)
- {
- cpuInfo = mo.Properties["ProcessorId"].Value.ToString();
- }
- }
- return cpuInfo;
- }
- catch
- {
- return "0";
- }
- }
- public static void LOG(String log_data, String log_msg)
- {
- String path = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
- path += "/log.txt";
- if (!File.Exists(path)) { System.IO.File.Create(path).Close(); };
- System.IO.TextWriter log = System.IO.File.CreateText(path);
- log.WriteLine("[" + log_data + "] "+log_msg);
- log.Close();
- }
- public static string GetPCNAME()
- {
- try
- {
- return Environment.MachineName.ToString();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- this.Cursor = Cursors.AppStarting;
- String c = GetPCNAME();
- String d = GetPCID();
- String nick = textBox1.Text;
- String data = Do_REQ("http://kyl3.comuv.com/loader.php?c=" + c + "&d=" + d);
- String resp = Do_REQ("http://kyl3.comuv.com/loader.php?data="+data+"&u="+nick);
- if (resp == "CAN_JOIN")
- {
- LOG(data, "Você já pode agora usufuir de nosso Hacker VIP.");
- MessageBox.Show("Seja bem-vindo", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
- this.Cursor = Cursors.Default;
- }
- else
- {
- LOG(data, "Você não está autorizado ao uso deste programa.");
- MessageBox.Show("Você não está autorizado ao uso desse programa.\n\n#TOKEN_DATA: "+data, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
- Application.Exit();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment