C # Hack Access database Password method

Source: Internet
Author: User
Tags access database

Original: C # hack Access database Password method

Using system;using system.collections.generic;using system.io;using system.linq;using System.Text;using        System.windows.forms;namespace demo{class Program {[STAThread] static void Main (string[] args)            {OpenFileDialog F = new OpenFileDialog ();            if (F.showdialog ()! = DialogResult.OK) return;        MessageBox.Show ("Password: [" + GetPassword (f.filename) + "]", "password"); }//Get password static string GetPassword (string file) {///unencrypted file 0x42 every interval before start to 0x61 Section value byte[] Basebyte = {0xbe, 0xec, 0x65, 0x9c, 0xFE, 0x28, 0x2b, 0x8a, 0x6c, 0x7b, 0xCD, 0XDF, 0x4f, 0x13, 0x            F7, 0xb1,}; byte flagbyte = 0x0c;            The value of the flag 0x62 string password = "";                try {FileStream fs = File.openread (File); Fs.                Seek (0x14, Seekorigin.begin); BYTE ver = (byte) fs.     ReadByte (); Get version, 1 is Access2000, 0 is ACCESS97 fs. Seek (0x42, Seekorigin.begin);                Byte[] bs = new byte[33]; if (fs.                Read (BS, 0,)! =) return "";                BYTE flag = (Byte) (bs[32] ^ flagbyte);                    for (int i = 0; i < i++) {byte b = (byte) (Basebyte[i] ^ (bs[i * 2]));  if (i% 2 = = 0 && ver = = 1) b ^= flag;                        Access + if (B > 0) {var ch = (char) b;                    Password +=ch;        }}} catch {} return password; }    }}

C # Hack Access database Password method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.