Hi
hab hier ein kleines problem:
Spoiler anzeigen
Func _HexEncode($bInput)
Local $tInput = DllStructCreate("byte[" & BinaryLen($bInput) & "]")
DllStructSetData($tInput, 1, $bInput)
Local $a_iCall = DllCall("crypt32.dll", "int", "CryptBinaryToString", _
"ptr", DllStructGetPtr($tInput), _
"dword", DllStructGetSize($tInput), _
"dword", 11, _
"ptr", 0, _
"dword*", 0)
If @error Or Not $a_iCall[0] Then
Return SetError(1, 0, "")
EndIf
Local $iSize = $a_iCall[5]
Local $tOut = DllStructCreate("char[" & $iSize & "]")
$a_iCall = DllCall("crypt32.dll", "int", "CryptBinaryToString", _
"ptr", DllStructGetPtr($tInput), _
"dword", DllStructGetSize($tInput), _
"dword", 11, _
"ptr", DllStructGetPtr($tOut), _
"dword*", $iSize)
If @error Or Not $a_iCall[0] Then
Return SetError(2, 0, "")
EndIf
Return SetError(0, 0, DllStructGetData($tOut, 1))
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>_HexEncode
[/autoit]wie kann ich den ausgabe Text wieder Verschlüsseln???
Lg Pceumel
Hier das script aus dem entnommen: (Liest NTFS ein)
Spoiler anzeigen
;===============================================================================
;
; Description: MFT-Access, UDF under development
; reading & parsing the Master File Table on NTFS Filesystems
; Version: v0.0.0.3
; Last modified: 2009-May-02
; URL: http://www.autoitscript.com/forum/index.php?showtopic=94269
; Author(s): KaFu (http://www.funk.eu), trancexx
;
;===============================================================================
;
#RequireAdmin
#include <winapi.au3>
Global $sDriveLetter = "c", $nBytes, $MFT_Offset, $bytes_to_read, $tBuffer, $hdd_handle, $hFile
dim $__WINAPCONSTANT_INVALID_SET_FILE_POINTER
ConsoleWrite("Analyzing Drive " & $sDriveLetter & ":, Filesystem detected: " & DriveGetFileSystem($sDriveLetter & ":") & @crlf & @crlf)
[/autoit] [autoit][/autoit] [autoit]if DriveGetFileSystem($sDriveLetter & ":") <> "NTFS" then exit
[/autoit] [autoit][/autoit] [autoit]; Read Boot-Sector
; http://www.autoitscript.com/forum/index...…29&view=findpos
; trancexx
Global $hComIn = FileOpen("\\.\" & $sDriveLetter & ":", 16)
Global $bRaw = FileRead($hComIn, 94); 84 bytes is enough
;~ ConsoleWrite($bRaw);_HexEncode($bRaw) & @CRLF)
ConsoleWrite(_HexENcode($bRaw) & @CRLF)
;~ ConsoleWrite(_hextostring($bRaw) & @CRLF)
FileClose($hComIn)
Func _WinAPI_SetFilePointerEx($hFile, $iPos, $iMethod = 0)
Local $aResult
$aResult = DllCall("kernel32.dll", "dword", "SetFilePointerEx", "hwnd", $hFile, "uint64", $iPos, "uint64*", 0, "dword", $iMethod)
If @error Then Return SetError(1, 0, -1)
If $aResult[0] = $__WINAPCONSTANT_INVALID_SET_FILE_POINTER Then Return SetError(2, 0, -1)
Return $aResult[0]
EndFunc ;==>_WinAPI_SetFilePointer
Func _HexEncode($bInput)
Local $tInput = DllStructCreate("byte[" & BinaryLen($bInput) & "]")
DllStructSetData($tInput, 1, $bInput)
Local $a_iCall = DllCall("crypt32.dll", "int", "CryptBinaryToString", _
"ptr", DllStructGetPtr($tInput), _
"dword", DllStructGetSize($tInput), _
"dword", 11, _
"ptr", 0, _
"dword*", 0)
If @error Or Not $a_iCall[0] Then
Return SetError(1, 0, "")
EndIf
Local $iSize = $a_iCall[5]
;~ Local $tOut = DllStructCreate("char[" & $iSize & "]")
$a_iCall = DllCall("crypt32.dll", "int", "CryptBinaryToString", _
"ptr", DllStructGetPtr($tInput), _
"dword", DllStructGetSize($tInput), _
"dword", 11, _
"ptr", DllStructGetPtr($tOut), _
"dword*", $iSize)
If @error Or Not $a_iCall[0] Then
Return SetError(2, 0, "")
EndIf
Return SetError(0, 0, DllStructGetData($tOut, 1))
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>_HexEncode
[/autoit]
Edit Oscar: Beitrag wiederhergestellt! Was soll das löschen des Ursprungspostings?
Edit: sry, dachte dass das thema weg wäre so