2016-10-03 39 views
1

我的任務是檢索丟失的密碼到一個軟件附帶的MS Access數據庫。非角色數據庫密碼如何連接

我嘗試了一個工具,但返回的字符串看起來已損壞,包括像下面這樣的「字符」:n <ژ「n2rکr」和其他根本沒有接縫的字符。但是,數據庫文件沒有損壞,因爲它附帶的軟件沒有問題從該數據庫獲取數據。

上午使用多重工具來找到密碼,且該結果

密碼恢復軟:

OllyDbg的:

enter image description here

和相同的結果 上午找到2密碼 克萊爾文字: 4.3.5_For_Alathar and non text:n <「n2r」r「

如何真正的密碼,以及如何連接:

<?php 
    $dbName = "D:\UwAmp\www\db\user.mdb"; 
    $password1 = "4.3.5_For_Alathar"; 
    $password2 = "n<ژ」n2ˆrک€r」"; 
    $user = ""; 
    if (!file_exists($dbName)) { 
     die("Could not find database file."); 
    } 

    $db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Pwd=$password1; "); 
    //$connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$dbName", $user , $password); 
    ?> 

和結果:

的SQLDriverConnect:-1905 [微軟] [ODBC Microsoft Access驅動程序]不是一個有效的密碼

+0

這可能是編碼不匹配。例如,密碼被存儲的Latin-1,並嘗試將其視爲UTF8。我會嘗試將其粘貼在一個純文本編輯器,如Notepad ++並擺弄編碼。 – Sitethief

+0

也有可能使用的字符不是拉丁字符。嘗試將其解析爲像https://2cyr.com/decode這樣的工具,例如 – Sitethief

+0

請注意,您的password2在前面(屏幕截圖中的空白矩形)有幾個不可顯示的字節/字符。它可能是一個salted/hashed/XORed ... password1版本 - 它們幾乎(?)等於長度 – cypherabe

回答

0

這個字符串,它已經編碼成utf-8

enter image description here

http://www.fileformat.info/info/unicode/char/0018/index.htm 


http://www.fileformat.info/info/unicode/char/000c/index.htm 


http://www.fileformat.info/info/unicode/char/0016/index.htm 


http://www.fileformat.info/info/unicode/char/001A/index.htm 

ژ 
http://www.fileformat.info/info/unicode/char/0698/index.htm 

」 
http://www.fileformat.info/info/unicode/char/201D/index.htm 

ک 
http://www.fileformat.info/info/unicode/char/06A9/index.htm 

n 
http://www.fileformat.info/info/unicode/char/006E/index.htm 

r 
http://www.fileformat.info/info/unicode/char/0072/index.htm 

< 
http://www.fileformat.info/info/unicode/char/003c/index.htm 

2 
http://www.fileformat.info/info/unicode/char/0032/index.htm 

ˆ 
http://www.fileformat.info/info/unicode/char/02C6/index.htm 

ˮ 
http://www.fileformat.info/info/unicode/char/02EE/index.htm 

€ 
http://www.fileformat.info/info/unicode/char/20AC/index.htm 
0

所以我需要發送這個字符,但不是相同的輸入輸出字符串! 如何打印此字符串 ň<ژ」 N2Rک€R」
「;

echo "orig= n<ژ」n2ˆrک€r」<br>"; 

這個輸出N <Ú~â€N2E†茹©â,¬râ€

不一樣如何打印正確的字符串或發送到數據庫

<?php 
$password = mb_convert_encoding('&#x18;&#xc;&#x16;&#xc;&#x1a;&#x6e;&#x3c;&#x698;&#x201d;&#x6e;&#x32;&#x2c6;&#x72;&#x6a9;&#x20ac;&#x72;&#x201d;', 'UTF-8', 'HTML-ENTITIES'); 
echo "orig= n<ژ」n2ˆrک€r」<br>"; 
echo "pas= ".$password."<br>"; 
$unicodeChar = '\u0698'; 
echo json_decode('"'.$unicodeChar.'"'); 
echo "<br>"; 
echo mb_convert_encoding("\x20\x1D", 'UTF-8', 'UTF-16BE'); 

echo "<br>"; 

echo "<br>"; 
?>