Warung Bebas

Selasa, 07 Mei 2013

Lihat Password Database Access

Masih membahas apa yang bisa dilakukan oleh VB 6.0 (Visual Basic 6.0) dan kali ini saya akan membagikan kepada teman-teman kode program untuk melihat/mengetahui kata sandi/password Database Access. Ok, langsung saja ke TKP.
Berikut ini langkah pembuatan programnya.
  1. Buat Project baru.
  2. Pada Form yang aktif tambahkan 1 Textbox dan 1 Commanbutton.
  3. Tambahkan 1 Common Dialog dengan cara, pilih menu Project --> Components --> centang Microsoft Common Dialog Control 6.0 (SP6).
  4. Atur Properties Textbox, Name=txtGet.
  5. Atur Properties Commanbutton, Name=cmdGet dan Caption=Pilih Database.
  6. Atur Properties Common DialogName=cd.
  7. Masuk ke jendela kode dan buat sebuah Function, berikut kodenya.
  8. Dim str2000 As String
    Dim File As String
    Option Explicit

    Private Function GetPassword()
    On Error GoTo ErrHand
    Dim Access2000Decode As Variant
    Dim fFile As Integer
    Dim bCnt As Integer
    Dim retXPwd(17) As Integer
    Dim wkCode As Integer
    Dim mgCode As Integer

    Access2000Decode = Array(&H6ABA, &H37EC, &HD561, &HFA9C, &HCFFA, _
    &HE628, &H272F, &H608A, &H568, &H367B, _
    &HE3C9, &HB1DF, &H654B, &H4313, &H3EF3, _
    &H33B1, &HF008, &H5B79, &H24AE, &H2A7C)

    If Len(File) > 0 Then
    fFile = FreeFile

    Open File For Binary As #fFile
    Get #fFile, 67, retXPwd
    Get #fFile, 103, mgCode
    Close #fFile

    mgCode = mgCode Xor Access2000Decode(18)

    str2000 = vbNullString

    For bCnt = 0 To 17
    wkCode = retXPwd(bCnt) Xor Access2000Decode(bCnt)
    If wkCode < 256 Then
    str2000 = str2000 & Chr(wkCode)
    Else
    str2000 = str2000 & Chr(wkCode Xor mgCode)
    End If
    Next bCnt
    Else
    str2000 = "No file Selected"
    End If

    Exit Function
    ErrHand:
    MsgBox "Error with opening file", vbCritical, App.Title
    End Function
  9. Klik 2x tombol Pilih Database dan masukkan kode berikut ini.
  10. cd.Filter = "Microsoft Access Files (*.mdb)|*.mdb|All Files (*.*)|*.*"
    cd.DialogTitle = App.FileDescription
    cd.ShowOpen
    If Not Len(cd.FileName) = 0 Then
    File = cd.FileName
    GetPassword
    txtGet.Text = "Passwordnya adalah: " & vbCrLf & str2000
    End If
  11. Selesai dan jalankan programnya.
Untuk Anda yang ingin contoh programnya, Anda dapat mendownloadnya disini atau disini.

0 komentar em “Lihat Password Database Access”

Posting Komentar

 

Indah Hidup Copyright © 2012 Fast Loading -- Powered by Blogger