老掉牙的ASP文件的加密与解密

加密|解密

 
using System;
using System.IO ;
using System.Text ;

namespace SuperData.ASP
{
 /// <summary>
 /// ASP破解程序
 /// 功能:
 /// 1.加密一个文件:EncodeFile(源文件,目标文件),EncodeFile(源目录,目标目录,文件名)
 /// 2.解密一个文件:DecodeFile(源文件,目标文件),DecodeFile(源目录,目标目录,文件名)
 /// 3.加密一个目录:EncodeFolder(源目录,目标目录[,递归子目录])
 /// 4.解密一个目录:DecodeFolder(源目录,目标目录[,递归子目录])
 /// 原作者:wanghr100(灰豆宝宝.net)
 /// 修改者:satchmo
 /// 更新日期:2005-5-24
 /// </summary>
 public class ASPDecode
 {

  private enum enumState
  {
   stateNull = 0 ,
   stateCopyInput = 100,
   stateReadLen = 101,
   stateDecode = 102,
   stateUnescape = 103
  };

  int[] pick_encoding = {
          1, 2, 0, 1, 2, 0, 2, 0, 0, 2, 0, 2, 1, 0, 2, 0,
          1, 0, 2, 0, 1, 1, 2, 0, 0, 2, 1, 0, 2, 0, 0, 2,
          1, 1, 0, 2, 0, 2, 0, 1, 0, 1, 1, 2, 0, 1, 0, 2,
          1, 0, 2, 0, 1, 1, 2, 0, 0, 1, 1, 2, 0, 1, 0, 2
         };

  int[] rawData = {
       0x64,0x37,0x69, 0x50,0x7E,0x2C, 0x22,0x5A,0x65, 0x4A,0x45,0x72,
       0x61,0x3A,0x5B, 0x5E,0x79,0x66, 0x5D,0x59,0x75, 0x5B,0x27,0x4C,
       0x42,0x76,0x45, 0x60,0x63,0x76, 0x23,0x62,0x2A, 0x65,0x4D,0x43,
       0x5F,0x51,0x33, 0x7E,0x53,0x42, 0x4F,0x52,0x20, 0x52,0x20,0x63,
       0x7A,0x26,0x4A, 0x21,0x54,0x5A, 0x46,0x71,0x38, 0x20,0x2B,0x79,
       0x26,0x66,0x32, 0x63,0x2A,0x57, 0x2A,0x58,0x6C, 0x76,0x7F,0x2B,
       0x47,0x7B,0x46, 0x25,0x30,0x52, 0x2C,0x31,0x4F, 0x29,0x6C,0x3D,
       0x69,0x49,0x70, 0x3F,0x3F,0x3F, 0x27,0x78,0x7B, 0x3F,0x3F,0x3F,
       0x67,0x5F,0x51, 0x3F,0x3F,0x3F, 0x62,0x29,0x7A, 0x41,0x24,0x7E,
       0x5A,0x2F,0x3B, 0x66,0x39,0x47, 0x32,0x33,0x41, 0x73,0x6F,0x77,
       0x4D,0x21,0x56, 0x43,0x75,0x5F, 0x71,0x28,0x26, 0x39,0x42,0x78,
       0x7C,0x46,0x6E, 0x53,0x4A,0x64, 0x48,0x5C,0x74, 0x31,0x48,0x67,
       0x72,0x36,0x7D, 0x6E,0x4B,0x68, 0x70,0x7D,0x35, 0x49,0x5D,0x22,
       0x3F,0x6A,0x55, 0x4B,0x50,0x3A, 0x6A,0x69,0x60, 0x2E,0x23,0x6A,
       0x7F,0x09,0x71, 0x28,0x70,0x6F, 0x35,0x65,0x49, 0x7D,0x74,0x5C,
       0x24,0x2C,0x5D, 0x2D,0x77,0x27, 0x54,0x44,0x59, 0x37,0x3F,0x25,
       0x7B,0x6D,0x7C, 0x3D,0x7C,0x23, 0x6C,0x43,0x6D, 0x34,0x38,0x28,
       0x6D,0x5E,0x31, 0x4E,0x5B,0x39, 0x2B,0x6E,0x7F, 0x30,0x57,0x36,
       0x6F,0x4C,0x54, 0x74,0x34,0x34, 0x6B,0x72,0x62, 0x4C,0x25,0x4E,
       0x33,0x56,0x30, 0x56,0x73,0x5E, 0x3A,0x68,0x73, 0x78,0x55,0x09,
       0x57,0x47,0x4B, 0x77,0x32,0x61, 0x3B,0x35,0x24, 0x44,0x2E,0x4D,
       0x2F,0x64,0x6B, 0x59,0x4F,0x44, 0x45,0x3B,0x21, 0x5C,0x2D,0x37,
       0x68,0x41,0x53, 0x36,0x61,0x58, 0x58,0x7A,0x48, 0x79,0x22,0x2E,
       0x09,0x60,0x50, 0x75,0x6B,0x2D, 0x38,0x4E,0x29, 0x55,0x3D,0x3F
      };

  private char[,] transformed;
  private int[] digits;
  string undigits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

  /// <summary>
  /// ASP DECODE构造函数
  /// </summary>
  public ASPDecode()
  {
   //
   // TODO: 在此处添加构造函数逻辑
   //
   transformed = new char[3,0x80];
   for(int i=0; i<96; i++)
   {
    for(int j=0; j<3; j++)
    {
     transformed[j,rawData[i * 3 + j]] = (char)((i==0) ? 9 : i + 31);
    }
   }

   Console.WriteLine ("==============

时间: 2024-10-29 17:48:06

老掉牙的ASP文件的加密与解密的相关文章

asp.net DES加密和解密实现方法

问题描述 asp.net DES加密和解密实现方法 asp.net DES加密和解密实现方法,需要代码,加密和解密结果和这个网址一样就可以了http://e-file.arkoo.com/tools/des3.htm 解决方案 Asp.net常用加密和解密方法.NET中加密和解密的实现方法.NET中加密和解密的实现方法

系统-文件夹加密和解密的问题

问题描述 文件夹加密和解密的问题 win8系统重装之后之前加密的文件夹无法使用了,请问大家怎么解决啊? 解决方案 如果你重装时不是选了刷新(refreshing)而是重置(Reset),旧用户账号已删除,不能打开的. 要是重装就能用其它用户打开,这个加密功能太渣了,不会有这种漏洞的.

用Asp写个加密和解密的类

用asp写个简单的加密和解密的类,在这个类中简单的实现了一个加密和解密.目的是和大家分享一下.这个类的破解非常简单.看看我的注释就知道是怎么回事了.下次编写一个java的加密和解密的类. class Base64Class rem Const dim sBASE_64_CHARACTERS转化码 dim lenString 计算字符串的长度 dim iCount 计数器 dim returnValue 返回值 dim tempChar缓存字符 dim tempString缓存字符串 dim pa

asp编写的加密和解密类

加密|解密 class Base64Class rem Const dim sBASE_64_CHARACTERS'转化码 dim lenString '计算字符串的长度 dim iCount '计数器 dim returnValue '返回值 dim tempChar'缓存字符 dim tempString'缓存字符串 dim paramString '参数字符串 dim temHex'缓存缓存十六进制 dim tempLow'缓存低位 dim tempHigh'缓存高位 dim mod3St

ASP.NET中加密与解密QueryString的方法

  我们知道,在aso,net中两个页面中传值,可以用querystring的方法,可是用它并不安全,稍有不慎,会把传送的信息参数的值完全暴露在URL上,多么可怕啊!   方法一:把表单提交方式改为post get是把参数数据队列加到提交表单的ACTION属性所指的URL中,值和表单内各个字段一一对应,在URL中可以看到. post是通过HTTP post机制,将表单内各个字段与其内容放置在HTML HEADER内一起传送到ACTION属性所指的URL地址.用户看不到这个过程.     方法二:

请问怎么在VS2010下用c#对一个.db文件进行加密和解密?用AES算法

问题描述 本人初学c#,刚了解了vs2010..winform和控制台学了一点点不太会啊现在要用AES算法..代码不知道怎么写也不知道怎么放,有谁能详细指导下吗... 解决方案 解决方案二:Streamstream=newFileStream(你的.db文件路径);byte[]buf=nwbuf[stream.length];//对buf进行AES加密,网上有代码,粘贴就行byte[]buf2=AES(buf);FileStreamfs=File.Creat("创建加密后的文件");/

asp.net TripleDES加密、解密算法_实用技巧

using System;    using System.Collections.Generic;    using System.Linq;    using System.Text;    using System.Security.Cryptography;    using System.IO;    namespace WindowsFormsApplication1    {       #region TripleDES算法           public class Clas

用ASP编写的加密和解密类_ASP CLASS类

class Base64Class rem Const  dim sBASE_64_CHARACTERS'转化码  dim lenString '计算字符串的长度  dim iCount '计数器  dim returnValue '返回值  dim tempChar'缓存字符  dim tempString'缓存字符串  dim paramString '参数字符串  dim temHex'缓存缓存十六进制  dim tempLow'缓存低位  dim tempHigh'缓存高位  dim m

用ASP编写的加密和解密类

class Base64Class rem Const  dim sBASE_64_CHARACTERS'转化码  dim lenString '计算字符串的长度  dim iCount '计数器  dim returnValue '返回值  dim tempChar'缓存字符  dim tempString'缓存字符串  dim paramString '参数字符串  dim temHex'缓存缓存十六进制  dim tempLow'缓存低位  dim tempHigh'缓存高位  dim m