• 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);
                }
            }
        }
    }
  • 相关阅读:
    模块与包的导入
    递归
    day04
    装饰器2_根据认证来源判断用户和计算登录时间
    装饰器1_统计时间函数装饰欢迎登录函数
    tail -f a.txt | grep 'python'
    函数
    内置函数1
    python模块整理
    VBS恶作剧代码
  • 原文地址:https://www.cnblogs.com/barrysgy/p/2281845.html
Copyright © 2020-2023  润新知