C# Привязка для программы(WEB)

Frost

Заблокирован
Заблокирован
Frost

Frost

Заблокирован
Заблокирован
Сообщения
4
Реакции
3
Please note, if you want to make a deal with this user, that it is blocked.
Всем привет выкладываю сорсы привязки ПО через хостинг.
Более детально не буду расписывать там всё понятно.
Папку хостинг на хостинг и при билде поменяйте hosting.com на адресс где лежит ваша привязка.

Ссылка на скачку архива:

Исходный код:

C#:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Management;
using System.Net;
using System.IO;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public static string _key = CalculateMD5Hash(GetHWID()).ToLower();
        public static string _isactivted = "Activated - " + _key + "%";
        public static string _server = "http://hosting.com/";
        public Form1()
        {
            
            InitializeComponent();
            CheckHost();
            textBox1.Text = _key;
            CheckHost();
            if (GET(_server,_key))
                {
                    button1.Enabled = true;
                    button1.Text = "Активировано";
                }
        }
        public static string CalculateMD5Hash(string input)
        {

            // Primeiro passo, calcular o MD5 hash a partir da string
            MD5 md5 = System.Security.Cryptography.MD5.Create();
            byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
            byte[] hash = md5.ComputeHash(inputBytes);

            // Segundo passo, converter o array de bytes em uma string haxadecimal
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < hash.Length; i++)
            {
                sb.Append(hash[i].ToString("X2"));
            }
            return sb.ToString();
        }
        private static string GetHWID()
        {
            var mbs = new ManagementObjectSearcher("Select ProcessorId From Win32_processor");
            ManagementObjectCollection mbsList = mbs.Get();
            string id = "";
            foreach (ManagementObject mo in mbsList)
            {
                id = mo["ProcessorId"].ToString();
                break;
            }
            return id;
        }
        private static bool GET(string Url, string Data)
        {
            System.Net.WebRequest req = System.Net.WebRequest.Create(Url + "?idname=" + Data);
            System.Net.WebResponse resp = req.GetResponse();
            System.IO.Stream stream = resp.GetResponseStream();
            System.IO.StreamReader sr = new System.IO.StreamReader(stream);
            string Out = sr.ReadToEnd();
            sr.Close();
            if (_isactivted.Equals(Out))
            {
                return true;
            }
            else return false;
        }
        private void CheckHost()
            {
                string[] host = File.ReadAllLines("C:\\Windows\\System32\\drivers\\etc\\hosts");
                foreach (string str in host)
                {
                    if (str.IndexOf("hosting.com") != -1)
                        {
                            MessageBox.Show("Найдена запрещенная строка в host файле");
                            Environment.Exit(1);                           
                        }
                }
            }
    }
}
base.php

PHP:
<?php
$key[] = "7cfa5e5c6559a281ceb2ee899278e722";
?>
index.php
PHP:
<?php
include 'base.php';
$_getkey = strip_tags(trim($_GET['idname']));
foreach ($key as $k)
    {
        if ($_getkey == $k)
            {
                echo 'Activated - '.$_getkey.'%';
            }
        else
            {
                echo 'Activated';
            }
    }
?>
 
  • Like
Реакции: Bug

Сверху Снизу