ich kriege folgende Fehlermeldung beim Ausführen des unten aufgeführten Codes:
Code: Alles auswählen
purebasic.asm [2347]:
MP8
purebasic.asm [2066] MP8 [374]:
MOV rax,eax
error: operand sizes do not match.
tcmount.pbi:
Code: Alles auswählen
;- constants
#TRUECRYPT = "pfad zur exe"
#VERSION = "0.01.01"
#EMAIL = "abc@def.com"
Code: Alles auswählen
OnErrorGoto(?FehlerAbfangen)
RaiseError(1024)
XIncludeFile "tcmount.pbi"
EnableExplicit
; Initialisierung der Schlüsselfolge
Declare.l _1()
; Prüfen der TrueCrypt.exe auf Veränderung
Declare.l _2()
; Einbinden der Laufwerke
Declare.l _3()
; Passwortabfrage
Declare.l _4()
; Prüft die Passworteingabe
Declare.l _5(pwd$)
Global Dim Char.s(255)
_1()
_2()
_4()
_3()
End
Procedure.l _1()
Protected.s a$, b$
Protected i.l
Restore Characters
Read.s a$
For i = 1 To Len(a$)
b$ = Mid(a$, i, 1)
Char(Asc(b$)) = b$
Next
ProcedureReturn #True
EndProcedure
Procedure.l _2()
Protected.s md5 = ""
md5 + Char('8')+Char('2')+Char('c')+Char('b')+Char('2')+Char('3')+Char('e')+Char('0')+Char('1')+Char('5')+Char('5')+Char('f')+Char('e')+Char('f')
md5 + Char('3')+Char('4')+Char('f')+Char('b')+Char('e')+Char('7')+Char('6')+Char('7')+Char('b')+Char('4')+Char('7')+Char('2')+Char('2')+Char('6')
md5 + Char('e')+Char('3')+Char('c')+Char('4')
If MD5FileFingerprint(#TRUECRYPT) <> md5
End 0
EndIf
ProcedureReturn #True
EndProcedure
Procedure.l _3()
Protected.s s$ = "", cmd$, pwd$, temp$
;truecrypt /v /l /p
s$ + Char('t')+Char('r')+Char('u')+Char('e')+Char('c')+Char('r')+Char('y')
s$ + Char('p')+Char('t')+Char(' ')+Char('/')+Char('v')+Char(' ')
s$ + Char(' ')+Char('/')+Char('l')+Char(' ')+Char('/')+Char('p')+Char(' ')
s$ + Char('@')+Char('*')
s$ + Char('9')+Char('2')+Char('6')+Char('e')+Char('e')+Char('8')+Char('6')
s$ + Char('3')+Char('1')+Char('0')+Char('b')+Char('8')+Char('4')+Char('2')
s$ + Char('0')+Char('b')+Char('8')+Char('8')+Char('a')+Char('9')+Char('1')
s$ + Char('d')+Char('5')+Char('0')+Char('8')+Char('7')+Char('c')+Char('f')
s$ + Char('b')+Char('c')+Char('b')+Char('1')
s$ + Char('*')+Char('@')+Char(' ')+Char('/')+Char('q')
cmd$ = Mid(s$, 1, 20)
pwd$ = Mid(s$, 21)
; hdd1
temp$ = cmd$
temp$ = InsertString(temp$, pwd$, 21)
temp$ = InsertString(temp$, "J", 17)
temp$ = InsertString(temp$, "\Device\Harddisk1\Partition1", 14)
RunProgram(#TRUECRYPT, temp$, GetPathPart(#TRUECRYPT))
; hdd2
temp$ = cmd$
temp$ = InsertString(temp$, pwd$, 21)
temp$ = InsertString(temp$, "K", 17)
temp$ = InsertString(temp$, "\Device\Harddisk1\Partition2", 14)
RunProgram(#TRUECRYPT, temp$, GetPathPart(#TRUECRYPT))
; hdd3
temp$ = cmd$
temp$ = InsertString(temp$, pwd$, 21)
temp$ = InsertString(temp$, "L", 17)
temp$ = InsertString(temp$, "\Device\Harddisk1\Partition3", 14)
RunProgram(#TRUECRYPT, temp$, GetPathPart(#TRUECRYPT))
ProcedureReturn #True
EndProcedure
Procedure.l _4()
Protected input$
;input$ = InputDlg(#VERSION, "Flüster mir was Geheimes...", #PB_String_Password)
If Len(input$) <= 0
End
EndIf
If _5(input$) = #False
End
EndIf
ProcedureReturn #True
EndProcedure
Procedure.l _5(pwd$)
Protected s$ = ""
pwd$ = MD5Fingerprint(@pwd$, StringByteLength(pwd$))
s$ + Char('0')+Char('8')+Char('e')+Char('4')+Char('8')+Char('9')+Char('c')+Char('8')+Char('c')+Char('2')
s$ + Char('5')+Char('0')+Char('d')+Char('5')+Char('f')+Char('f')+Char('0')+Char('9')+Char('4')+Char('e')
s$ + Char('f')+Char('c')+Char('7')+Char('2')+Char('a')+Char('f')+Char('7')+Char('4')+Char('3')+Char('4')
s$ + Char('')+Char('a')+Char('5')
ProcedureReturn (pwd$ = s$)
EndProcedure
DataSection
Characters:
Data.s "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234546789@#'*+!§$%&/()=?,.<> "
EndDataSection
;- Fehlerbehandlung während der Laufzeit
FehlerAbfangen:
; ErrorDialog(0, "Fehler", "Es ist ein Fehler während der Ausführung von %file% aufgetreten!", GetErrorInfo(), #EMAIL)
Return