Menu

KPScript not working

Help
2024-05-30
2024-06-01
  • Vassilis Contogeorgos

    Hi,

    Keepass version 2.56 and i have downloaded the kpscript.

    All i want to accomplish is on a specific entry to be able from command prompt to edit and change the password only.

    I'm using the following command: see screenshot

    It says OK but the entry is not updated.

    What am i doing wrong ?

    Thank you,
    Vassilis.

     
  • Dominik Reichl

    Dominik Reichl - 2024-05-30

    There is a '-' missing before 'ref-Title'.

    Best regards,
    Dominik

     
    👍
    1
    • Vassilis Contogeorgos

      dah! You are right, but still no luck! it frustrate me, something is wrong i do not know what !!!
      Do i need a username as well ?
      The screenshot shows the title of the entry.

       
  • Paul

    Paul - 2024-05-30

    "Operation completed" just means KPScript accepted the commands, not that it did what you wanted.

    I would test by using "GetEntryString" first. This confirms that you have the right entry.
    KPScript -c:GetEntryString "C:\KeePass\MyDb.kdbx" -pw:MyPassword -Field:Title -ref-Title:"Send Password"

    cheers, Paul

     
  • Vassilis Contogeorgos

    I still don't get nothing. No output on the GetEntryString.
    There is probably something wrong with the database i do not know.
    Thanks everybody!

     
  • Paul

    Paul - 2024-05-31

    Nothing wrong with the DB, it will be your command.

    Here is a test database and command for you to work with.
    Note: the search is case sensitive. If you use "cs 2" it won't return anything.

    KPScript.exe -c:GetEntryString \tmp\1.kdbx -pw:1 -Field:Title -ref-Title:"CS 2"

    cheers, Paul

     
  • Vassilis Contogeorgos

    Your database works.
    Mine works also now.

    But the set-password refuses to work 😫😫

     
  • Paul

    Paul - 2024-05-31

    This line works for me.
    KPScript.exe -c:EditEntry \tmp\1.kdbx -pw:1 -ref-Title:"CS 2" -set-Password:"Top Secret"

    cheers, Paul

     
  • Vassilis Contogeorgos

    I think there is a misunderstanding.
    It works only if the database is closed and then you open it.
    is that normal ?
    Cause it overturns the purpose that i needed it for 😊

     
  • Paul

    Paul - 2024-05-31

    KPScript updates the database file.
    KeePass opens the database file and keeps the decrypted data in memory.
    There is no way to update the copy in memory with an external app. You need to lock/unlock KeePass to re-read the database file.

    Alternatively, use KeePassXC as the client. This checks the database file periodically and updates the copy in memory - asks first.
    There is no issue using both KPScript and XC at the same time.

    cheers, Paul

     
  • Vassilis Contogeorgos

    Thank you Paul for the explanation.

     
  • Vassilis Contogeorgos

    The fact remains that the database should be close and the reopen it to get the new password, or lock unlock. Which defeats my purpose of what i need it for 😟

     

Log in to post a comment.

MongoDB Logo MongoDB