• 大小: 0.1M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-14
  • 语言: C#
  • 标签: 其他  

资源简介

NF-C#版本口令加密BAT源码.rar

资源截图

代码片段和文件信息

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.IO;
using System.Security.Cryptography;
using Microsoft.Win32;

namespace EncryptBAT
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            FileMenu(Application.ExecutablePath + “0“ Application.ExecutablePath);
            string[] str = Environment.GetCommandLineArgs();
            try
            {
                string strFile = ““;
                for (int i = 2; i < str.Length; i++)
                    strFile += str[i];
                FileInfo FInfo = new FileInfo(strFile);
                if (FInfo.Extension.ToLower() == “.mrbat“)
                    textBox1.Text = strFile;
            }
            catch { }
        }
        
        //选择要加密或解密的文件
        private void button1_Click(object sender EventArgs e)
        {
            openFileDialog1.Filter = “*.bat(bat文件)|*.bat|*.mrbat(mrbat加密文件)|*.mrbat|*.*(所有文件)|*.*“;
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
                textBox1.Text = openFileDialog1.FileName;
        }

        //加密bat文件
        private void button2_Click(object sender EventArgs e)
        {
            string strPwd = textBox2.Text;
            byte[] btRKey = new byte[0];
            if (strPwd.Length == 6)
            {
                btRKey = new byte[] { (byte)strPwd[0] (byte)strPwd[1] (byte)strPwd[2] (byte)strPwd[3] (byte)strPwd[4] (byte)strPwd[5] (byte)strPwd[0] (byte)strPwd[1] };
            }
            if (strPwd.Length == 7)
            {
                btRKey = new byte[] { (byte)strPwd[0] (byte)strPwd[1] (byte)strPwd[2] (byte)strPwd[3] (byte)strPwd[4] (byte)strPwd[5] (byte)strPwd[6] (byte)strPwd[0] };
            }
            if (strPwd.Length >= 8)
            {
                btRKey = new byte[] { (byte)strPwd[0] (byte)strPwd[1] (byte)strPwd[2] (byte)strPwd[3] (byte)strPwd[4] (byte)strPwd[5] (byte)strPwd[6] (byte)strPwd[7] };
            }
            FileStream FStream = new FileStream(textBox1.Text FileMode.Open FileAccess.Read);
            FileStream NewFStream = new FileStream(textBox1.Text + “.mrbat“ FileMode.OpenOrCreate FileAccess.Write);
            NewFStream.SetLength((long)0);
            byte[] buffer = new byte[0x400];
            int MinNum = 0;
            long length = FStream.Length;
            int MaxNum = (int)(length / ((long)0x400));
            DES myDES = new DESCryptoServiceProvider();
            CryptoStream CStream = new CryptoStream(NewFStream myDES.CreateEncryptor(btRKey btRKey) CryptoStreamMode.Write);
            while (MinNum < length)
            {
                int count = FStream.Read(bu

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      28959  2019-11-24 22:24  NF-C#版本口令加密BAT源码\123.pptx

     文件       3766  2009-02-12 13:51  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\EncryptBAT.csproj

     文件       7844  2009-02-12 13:52  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Form1.cs

     文件       7182  2009-02-12 13:50  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Form1.designer.cs

     文件       6017  2009-02-12 13:50  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Form1.resx

     文件        491  2009-02-12 13:48  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Program.cs

     文件       1376  2009-02-12 13:48  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Properties\AssemblyInfo.cs

     文件       2870  2009-02-12 13:48  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Properties\Resources.Designer.cs

     文件       5612  2009-02-12 13:48  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Properties\Resources.resx

     文件       1095  2009-02-12 13:48  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Properties\Settings.Designer.cs

     文件        249  2009-02-12 13:48  NF-C#版本口令加密BAT源码\Backup\EncryptBAT\Properties\Settings.settings

     文件        920  2009-02-12 13:48  NF-C#版本口令加密BAT源码\Backup\EncryptBAT.sln

    ..A..H.     34816  2009-02-12 13:54  NF-C#版本口令加密BAT源码\Backup\EncryptBAT.suo

     文件      13824  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\bin\Debug\EncryptBAT.exe

     文件      32256  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\bin\Debug\EncryptBAT.pdb

     文件      22704  2019-10-16 22:08  NF-C#版本口令加密BAT源码\EncryptBAT\bin\Debug\EncryptBAT.vshost.exe

     文件        490  2013-03-18 17:00  NF-C#版本口令加密BAT源码\EncryptBAT\bin\Debug\EncryptBAT.vshost.exe.manifest

     文件       4085  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\EncryptBAT.csproj

     文件       7844  2019-02-22 15:26  NF-C#版本口令加密BAT源码\EncryptBAT\Form1.cs

     文件       8035  2019-10-16 22:08  NF-C#版本口令加密BAT源码\EncryptBAT\Form1.designer.cs

     文件       6017  2019-02-22 15:26  NF-C#版本口令加密BAT源码\EncryptBAT\Form1.resx

     文件        789  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6885  2019-10-16 22:08  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1478  2019-10-16 22:08  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\EncryptBAT.csproj.FileListAbsolute.txt

     文件        847  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\EncryptBAT.csproj.GenerateResource.Cache

     文件      13824  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\EncryptBAT.exe

     文件        180  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\EncryptBAT.Form1.resources

     文件      32256  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\EncryptBAT.pdb

     文件        180  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\EncryptBAT.Properties.Resources.resources

     文件       4608  2019-02-22 15:25  NF-C#版本口令加密BAT源码\EncryptBAT\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

............此处省略30个文件信息

评论

共有 条评论