Danke für die Hilfe
jetzt hab ich das passwort in der ini datei aber verschlüsselt
KeePass_Starten
AutoIt
Opt("SendKeyDelay", 100) ;50 milliseconds default 5
Opt("WinWaitDelay", 500) ;1000 milliseconds default 250
Opt("MustDeclareVars", 1) ;0=no, 1=require pre-declaration default 0
Opt("WinTitleMatchMode", 1) ;Alters the method that is used to match window titles during search operations. 1 = (default) Match the title from the start
#include <File.au3>
#include <Crypt.au3>
#include <MsgBoxConstants.au3>
Global $iniPfad ;ini Dateipfad
Global $PP ;ProgrammPfad
Global $DP ;DatenbankPfad
Global $Parameter ;KeePass Kennwort
HotKeySet("{ESC}", "kill")
$iniPfad = @ScriptDir & "\pw.ini" ;Variable Pfad und Datei - Diese Datei sollte bereits existieren
$PP = IniRead($iniPfad, "KeePass", "Url1", "")
$DP = IniRead($iniPfad, "KeePass", "Url2", "")
$Parameter = IniRead($iniPfad, "KeePass", "Parameter", "")
Local Const $sUserKey = "PassWort16+-" ; Declare a password string to decrypt/encrypt the data.
$Parameter = _Crypt_DecryptData($Parameter, $sUserKey, $CALG_RC4) ; Decrypt the data using the generic password string. The return value is a binary string.
$Parameter=BinaryToString($Parameter)
ShellExecute($PP, $DP & " /pw:" & $Parameter)
Exit
Func kill()
Exit
EndFunc ;==>kill
Alles anzeigen
Passwort setzen
AutoIt
#include <Crypt.au3>
#include <MsgBoxConstants.au3>
Global $iniPfad ;ini Dateipfad
$iniPfad = @ScriptDir & "\pw.ini" ;Variable Pfad und Datei - Diese Datei sollte bereits existieren
Local $Parameter = InputBox("Sicherheitscheck", "Bitte geben Sie ein Passwort ein.", "", "*M") ; InputBox für Passwort
Local Const $sUserKey = "PassWort16+-" ; Declare a password string to decrypt/encrypt the data.
Local $sData = $Parameter ; Data that will be encrypted.
Local $bEncrypted = _Crypt_EncryptData($sData, $sUserKey, $CALG_RC4) ; Encrypt the data using the generic password string.
IniWrite($iniPfad, "KeePass", "Parameter", $bEncrypted)
Exit
Alles anzeigen