zoukankan      html  css  js  c++  java
  • C#读写注册表 二进制写入

    msn传送exe rar等文件要杀毒软件检测. 自己写个软件修改注册表, 跳过检测
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.Win32;
    using System.Runtime.InteropServices;

    namespace RegiterMsnAnitVirus
    {
        class Program
        {
            static void Main(string[] args)
            {
                //打开注册表 修改msn杀毒软件键值
                RegistryKey key = Registry.Users.OpenSubKey(@"S-1-5-21-2011881525-2935076320-2083711069-500\Software\Microsoft\MSNMessenger"true);
                string strFileName = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
                byte[] bytes = Encoding.Unicode.GetBytes("\"" + strFileName + "\"\0");
                try
                {
                    //byte[] bytes = (byte[])key.GetValue("AntiVirus");
                    
    //if (bytes == null || bytes.Length < 3)
                    
    //{
                    key.SetValue("AntiVirus", bytes, RegistryValueKind.Binary);
                    //}
                }
                catch
                {
                    key.SetValue("AntiVirus", bytes, RegistryValueKind.Binary);
                }
            }
        }
    }
  • 相关阅读:
    路障【SPFA】
    路障【SPFA】
    糟糕的一天【栈】
    糟糕的一天【栈】
    糟糕的一天【栈】
    糟糕的一天【栈】
    2018年暑假 纪中培训总结
    2018年暑假 纪中培训总结
    2018年暑假 纪中培训总结
    仪仗队【数论】
  • 原文地址:https://www.cnblogs.com/barrysgy/p/2281845.html
Copyright © 2011-2022 走看看