Git Product home page Git Product logo

pass-winmenu's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pass-winmenu's Issues

Clipboard Empty (Windows 10)

After seeing notification that the password has been copied to clipboard the paste is empty.

Steps to Replicate:

  1. Start Pass-winmenu
  2. Hit the Hot Key combo
  3. Select the Secret
  4. Enter password for decryption key
  5. See notification
  6. Try to paste from clipboard (Ctrl-V)

ERR empty or clipboard is not loaded.

Add passphrase

I use passprhase for some stores instead of gpg key. Passmenu works with it but it pops up passphrase each time.

Passprhase should be taken from config or environment var or cached.

Value cannot be null

I'm using native-git, when trying to push or pull from the remote i get the following error

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentNullException: Value cannot be null.
Parameter name: name
   at LibGit2Sharp.RemoteCollection.get_Item(String name) in C:\projects\libgit2sharp\LibGit2Sharp\RemoteCollection.cs:line 39
   at PassWinmenu.ExternalPrograms.Git.Fetch()

Package GPG and Git with the application

This will take a little more planning and consideration. It will involve porting the GPG and Git wrappers (which currently call the GPG and Git processes directly) to use GPGME and a Git library (which?) instead.

Users should be able to substitute these libraries if they wish to use their own versions instead. Ideally, the libraries will be compiled directly into the executable, and then, on first run, be extracted to a libraries folder next to the executable, from which they will then be loaded.

Unhandled exception when there's no default application for YAML files

On my Windows system, I have yet to pick a default application for YAML files (i.e. they appear with a blank icon in the file explorer and if I double-click on them I get the app picker which lets me pick a program on the spot).
I was testing pass-winmenu and I right-clicked on the icon in the tray and then on More Action -> Edit Configuration. Upon doing that, a window popped up warning me about an unhandled exception:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): No application is associated with the specified file for this operation
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at PassWinmenu.WinApi.Notifications.<>c__DisplayClass10_0.<AddMenuActions>b__8(Object sender, EventArgs args)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
pass-winmenu
    Assembly Version: 1.9.1.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/Gianluca/Desktop/pass-winmenu/pass-winmenu.exe
----------------------------------------
PresentationFramework
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
PresentationCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System.Xaml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
PresentationFramework.Aero2
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero2/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero2.dll
----------------------------------------
McSherry.SemanticVersioning
    Assembly Version: 1.2.1.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/Gianluca/Desktop/pass-winmenu/pass-winmenu.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
YamlDotNet
    Assembly Version: 5.0.0.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/Gianluca/Desktop/pass-winmenu/pass-winmenu.exe
----------------------------------------
LibGit2Sharp
    Assembly Version: 0.24.0.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/Gianluca/Desktop/pass-winmenu/pass-winmenu.exe
----------------------------------------
Newtonsoft.Json
    Assembly Version: 11.0.0.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/Gianluca/Desktop/pass-winmenu/pass-winmenu.exe
----------------------------------------
UIAutomationTypes
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
----------------------------------------
UIAutomationProvider
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4121.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll
----------------------------------------
PresentationFramework-SystemDrawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.3752.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemDrawing/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemDrawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

added EDIT option to your script, corrected variable overwrite and logic on --no-username

#!/usr/bin/env bash

shopt -s nullglob globstar

typeit=0
username=1
editit=0

while [[ -n "$1" ]]; do
        if [[ $1 == "--type" ]]; then
                typeit=1
        elif [[ $1 == "--no-username" ]]; then
                username=0
        elif [[ $1 == "--edit" ]]; then
                editit=1
        elif [[ $1 == "--" ]]; then
                break;
        fi
        shift
done

prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )

password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")

if [[ $editit -eq 1 ]]; then
        gnome-terminal -- pass edit "$password" > /dev/null
        exit
fi

[[ -n $password ]] || exit

if [[ $typeit -eq 0 ]]; then
        pass show -c "$password" | xclip
else
        pwfile=$(pass show "$password")
        pwd=$(printf "%s" "$pwfile" | sed -n 1p)
        uid=$(printf "%s" "$pwfile" | grep -Po "[Uu]ser(name)?: \K(.*)")
        printf '%s' "$pwd" | xclip -selection clipboard
        print '%s' "$pwd" | xclip
        if [ -z "$uid" ] || [[ $username -eq 0 ]]; then
                printf '%s' "$pwd" | xdotool type --clearmodifiers --file -
        else
                pstr=$(printf '%s\t%s' "$uid" "$pwd")
                xdotool type "$pstr"
        fi
fi

Doesn't seem to support UNIX style newlines

Passwords generated using gopass on Linux don't work properly when synced over. pass-winmenu will just put an empty string into the clipboard.

If I edit the password file using pass-winmenu the password correctly shows up, and saving it will allow pass-winmenu to read it properly.

This gets really annoying since I have to generate the password on one computer, push, then pull on my Windows computer and push again to make it readable to all of my pass clients.

Add a built-in password editor

The current method for editing passwords is somewhat involved, since it requires users to keep a window open in the background while editing the password in their default text editor, and then choose whether to save or discard their changes.

If a simple editor is integrated into the application, that process becomes a lot easier, as we can simply show an edit window with save/discard buttons. This also means the plaintext password can remain in memory instead of having to be saved to disk (so the editor can open it), which is more secure.

A configuration option should be added for users who wish to use their own text editor instead of the built-in one.

Unhandled exception for clipboard access fail

On Windows 10, I had this exception occur when trying to access a test password I just created:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************
System.Runtime.InteropServices.COMException (0x800401D0): OpenClipboard Failed (Exception from HRESULT: 0x800401D0 (CLIPBRD_E_CANT_OPEN))
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at System.Windows.Clipboard.Flush()
   at System.Windows.Clipboard.CriticalSetDataObject(Object data, Boolean copy)
   at System.Windows.Clipboard.SetDataInternal(String format, Object data)
   at PassWinmenu.WinApi.ClipboardHelper.Place(String text, TimeSpan timeout)
   at PassWinmenu.Windows.DialogCreator.DecryptPassword(Boolean copyToClipboard, Boolean typeUsername, Boolean typePassword)
   at PassWinmenu.WinApi.Notifications.<>c__DisplayClass10_0.<AddMenuActions>b__0(Object sender, EventArgs args)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
pass-winmenu
    Assembly Version: 1.9.1.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/431577/Documents/Cmder/vendor/pass-winmenu/pass-winmenu.exe
----------------------------------------
PresentationFramework
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
PresentationCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xaml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
PresentationFramework.Aero2
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero2/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero2.dll
----------------------------------------
McSherry.SemanticVersioning
    Assembly Version: 1.2.1.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/431577/Documents/Cmder/vendor/pass-winmenu/pass-winmenu.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
YamlDotNet
    Assembly Version: 5.0.0.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/431577/Documents/Cmder/vendor/pass-winmenu/pass-winmenu.exe
----------------------------------------
LibGit2Sharp
    Assembly Version: 0.24.0.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/431577/Documents/Cmder/vendor/pass-winmenu/pass-winmenu.exe
----------------------------------------
Newtonsoft.Json
    Assembly Version: 11.0.0.0
    Win32 Version: 1.9.1
    CodeBase: file:///C:/Users/431577/Documents/Cmder/vendor/pass-winmenu/pass-winmenu.exe
----------------------------------------
UIAutomationTypes
    Assembly Version: 4.0.0.0
    Win32 Version: 4.7.3190.0 built by: NET472REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



Version without third party tools

All 3thd party tools can be installed separately with a single command using chocolatey. If pass-winmenu is available on the chocolaty as well those tools will be installed automatically if they are mentioned as dependencies.

cinst gpg4win-vanilla 7zip git

This would allow one to use latest versions of such tools and reduce the size of the package itself which can be updated separately.

(possible false alarm) Windows Defender reports pass-winmenu.exe as a trojan

I apologize for any undue alarm this brings, but Windows Defender just reported this .exe as a Trojan. In the event this is a false positive or a result of a trojan that is on my machine unrelated to pass-winmenu, I will try to update here. At any rate within moments of unzipping the current latest release, Windows Defender quarantined the .exe and I found the following report in the Windows Defender details:

2019-03-10

Add gpg-agent option to extend passphrase timeout?

I am happy with a longer time before the passphrase must be reentered. This is a command-line parameter for gpg-agent and I think it is is set using the --default-cache-ttl option, defaulting to 600 seconds.

I only use gpg-agent for pass-winmenu right now. I am manually starting the gpg-agent so I can set my own values, but it would be great to have access to that through your config file.

Thoughts?

update
Finally located the gpg-agent.conf in C:\Users<username>\AppData\Roaming\gnupg. Windows search on C: hadn't located it for some reason.

I added a line to my file:

###+++--- GPGConf ---+++###
###+++--- GPGConf ---+++### 11/10/17 12:50:24 Romance Standard Time
GPGConf edited this configuration file.
#It will disable options before this marked block, but it will
#never change anything below these lines.
default-cache-ttl 7200

Then confirmed it was set using PowerShell (or CMD):
PS > gpgconf --list-options gpg-agent

Monitor:1:0:Options controlling the diagnostic output:0:0::::
verbose:12:0:verbose:0:0::::
quiet:8:0:be somewhat more quiet:0:0::::
Configuration:1:0:Options controlling the configuration:0:0::::
disable-scdaemon:8:1:do not use the SCdaemon:0:0::::
enable-ssh-support:0:0:enable ssh support:0:0::::
ssh-fingerprint-digest:24:2:use ALGO to show ssh fingerprints:1:1:ALGO:"md5::
enable-putty-support:0:0:enable putty support:0:0::::
enable-extended-key-format:8:3::0:0::::
Debug:1:1:Options useful for debugging:0:0::::
debug-level:26:1:set the debugging level to LEVEL:1:1:LEVEL:"none::
log-file:8:1:write server mode logs to FILE:32:1:FILE:::
Security:1:0:Options controlling the security:0:0::::
default-cache-ttl:24:0:expire cached PINs after N seconds:3:3:N:600::7200
default-cache-ttl-ssh:24:1:expire SSH keys after N seconds:3:3:N:1800::

Unhandled Exception during frist Start

After installation manually the v.10 (with GPG): it says on first Start:

[15:18:22.206] [DBG] ------------------------------
[15:18:22.207] [DBG] Starting pass-winmenu v1.10
[15:18:22.207] [DBG] ------------------------------
[15:18:22.319] [DBG] Config reloading enabled
[15:18:22.384] [DBG] Attempting to detect the GPG installation directory
[15:18:22.385] [DBG] GPG executable found at the configured path. Assuming installation dir to be C:\Program Files\pass-winmenu\lib\GnuPG\bin
[15:18:22.442] [ERR] Could not start pass-winmenu: An exception occurred.
[15:18:22.445] DependencyResolutionException (An exception was thrown while activating PassWinmenu.Actions.ActionDispatcher -> PassWinmenu.Windows.DialogCreator -> ฮป:PassWinmenu.ExternalPrograms.ISyncService.) in :0:0
[15:18:22.445]   DependencyResolutionException (A delegate registered to create instances of 'PassWinmenu.ExternalPrograms.ISyncService' returned null.) in :0:0
[15:18:22.445]     -> in Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance -- :0:0
[15:18:22.445]     -> in Autofac.Core.Resolving.InstanceLookup.Activate -- :0:0
[15:18:59.414] [DBG] Shutting down.

OutOfMemory Exception

Steps to reproduce:

  1. Ctrl + Alt + P
  2. Search/Select record
  3. Press Enter

The error does not happen every time.

image

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at System.Runtime.InteropServices.ComTypes.IDataObject.GetData(FORMATETC& format, STGMEDIUM& medium)
   at System.Windows.DataObject.OleConverter.GetDataInner(FORMATETC& formatetc, STGMEDIUM& medium)
   at System.Windows.DataObject.OleConverter.GetDataFromOleHGLOBAL(String format, DVASPECT aspect, Int32 index)
   at System.Windows.DataObject.OleConverter.GetDataFromBoundOleDataObject(String format, DVASPECT aspect, Int32 index)
   at System.Windows.DataObject.OleConverter.GetData(String format, Boolean autoConvert, DVASPECT aspect, Int32 index)
   at System.Windows.DataObject.OleConverter.GetData(String format, Boolean autoConvert)
   at System.Windows.DataObject.GetData(String format, Boolean autoConvert)
   at System.Windows.Clipboard.GetDataInternal(String format)
   at System.Windows.Clipboard.GetText(TextDataFormat format)
   at PassWinmenu.Program.CopyToClipboard(String value, Double timeout)
   at PassWinmenu.Program.DecryptPassword(Boolean copyToClipboard, Boolean typeUsername, Boolean typePassword)
   at PassWinmenu.Program.<>c__DisplayClass14_0.<AssignHotkeys>b__0()
   at PassWinmenu.Hotkeys.HotkeyManager.HandleWndProc(Message& message)
   at PassWinmenu.Program.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1590.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
pass-winmenu
    Assembly Version: 1.4.0.0
    Win32 Version: 1.4.0.0
    CodeBase: file:///C:/Users/Rares/Apps/pass-winmenu/pass-winmenu.exe
----------------------------------------
PresentationFramework
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1647.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1647.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1647.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1647.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
PresentationCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1647.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1590.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1590.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
LibGit2Sharp
    Assembly Version: 1.0.22.0
    Win32 Version: 1.4.0.0
    CodeBase: file:///C:/Users/Rares/Apps/pass-winmenu/pass-winmenu.exe
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1590.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1590.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
YamlDotNet
    Assembly Version: 3.8.0.0
    Win32 Version: 1.4.0.0
    CodeBase: file:///C:/Users/Rares/Apps/pass-winmenu/pass-winmenu.exe
----------------------------------------
System.Xaml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1647.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
PresentationFramework.Aero2
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1590.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero2/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero2.dll
----------------------------------------
PresentationFramework-SystemXml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1590.0
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll
----------------------------------------
UIAutomationTypes
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1590.0 built by: NETFXREL2
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

image

Support automatic config file migrations

If an older config file version is detected, show a prompt asking the user whether an automatic migration should be attempted.

This feature should preferably make it to v1.7 since that version will introduce several breaking changes to the config file format.

Migrating a config file to a new version would probably involve the following steps

  • while loading the config file, look for (the absence of) a flag specifying its version* to determine whether it should be upgraded
  • analyse the old config file to determine which of its settings differ from their defaults**
  • rename the old config file so it can be kept as a backup
  • generate a new config file (the same way it's done when no config file exists)
  • for all changed settings, determine how they should be mapped to the new config file format
  • load the newly generated config file
  • apply the settings that should be changed
  • save the newly generated config file
  • reload the newly generated config file to ensure it deserialises correctly
  • continue startup as usual

*) If no version flag is present, assume the config file to be that of pass-winmenu v1.6.1
**) If the config file cannot be analysed because it belongs to some version of pass-winmenu older than v1.6.1, inform the user that they'll have to manually upgrade their configuration file.

Make use of accent colours on Windows 8+

Since Windows 8, users can choose an accent colour to be used in the start menu, settings window, and other places.

It would be nice to be able to reference the Windows accent colour in the style configuration. The default colour scheme should use this colour if possible. If no accent colour is available (Windows 7), fall back to the original colour scheme. Manual colour configuration should remain possible.

References:
https://stackoverflow.com/questions/13660976/get-the-active-color-of-windows-8-automatic-color-theme
https://blog.codeinside.eu/2016/04/26/get-the-windows-10-or-8-accent-color-from-wpf/

Allow to configure keys to select password

For example I start typing but the password I need is a choice that is not immediate. It would be great to allow for Tab for example to select the key I want. Like, instead of having to press the Down/Up keys, I could use Tab/Shift+Tab, or the sort Ctrl+j/Ctrl+k, etc..

Great software, thanks!

Arrange window in size and position

First of all,

thanks for this awsome tool, it's fantastic to use one central pass git store truly cross-platform.
I use it regularly since 1.7 ๐Ÿ‘
This is just a question, is there a way of modifying the window behaviour in size and position?
At least free positioning would be really nice.

Thanks

On Quit, process isn't terminated

When you right-click on "Quit", you'll notice that the pass-winmenu.exe process still lingers in memory. It seems that the menu item doesn't trigger the necessary exit calls (e.g. Application.Exit(), Environment.Exit(0)).

Note on creating a password store (Windows -> Linux)

This is not necessarily a bug, but it might be worth having it somewhere.

The instructions for initializing a password store in Windows contain:

powershell> echo "[email protected]" | Out-File -Encoding utf8 $HOME\.password-store\.gpg-id

This creates a .gpg-id without a new-line at the end of the file.

This works fine in Windows, but once the password repository is cloned on Linux, pass is not happy about the missing new-line. The passwords can be decrypted fine, but when adding a new password you get:

> pass add Foo
Enter password for Foo:
Retype password for Foo:
gpg: no valid addressees
gpg: [stdin]: encryption failed: No user ID
Password encryption aborted.

You can debug this by using bash -x pass add Foo and you will see that the GPG command executed is:

gpg2 -e -o /home/user/.password-store/Foo.gpg --verbose --yes --compress-algo=none --no-encrypt-to --batch --use-agent

This is wrong as it is missing the -r [email protected] argument. The correct line is:

gpg2 -e -r [email protected] -o /home/user/.password-store/Foo.gpg --quiet --yes --compress-algo=none --no-encrypt-to --batch --use-agent

So, it seems that the pass script on Linux is not picking up the email address from the non new-line terminated .gpg-id file. Once you add a new-line at the end of .gpg-id everyone is happy.

Under some conditions GPG may hang indefinitely

Some unknown operations can seemingly cause gpg-agent.exe to enter a state where it won't be able to process any requests from gpg.exe. When this happens, gpg.exe hangs indefinitely without producing any output.

Ideally the cause for this condition should be identified. It is possible that GPG will emit an error message when the agent enters the 'failure state'. Logging all output may help detect this.

If no cause can be identified, a workaround will be required. One way to work around this issue would be to kill GPG (and gpg-agent) if it does not produce any output at all after a set amount of time, and retry the attempted decryption/encryption operation.

dmenu script username issue

I was having a problem with the dmenu script where it wasn't picking up my username for some of my password files.

I tracked it down to [[ $username -eq 0 ]] which was having a bad time presumably because the affected usernames weren't email addresses so didn't contain . or @.

I'll admit I'm not that great at bash scripting but I couldn't figure out what the difference between [ -z "$username" ] and [[ $username -eq 0 ]] is or why you would want to test for both.

I've removed [[ $username -eq 0 ]] from mine for now and it has resolved my problem but I was wondering if there was a more appropriate resolution.

Unable to decrypt

It fails when decrypting, saying that I do not have a secret key with that ID.
I do have that though.. :

$ gpg --list-secret-keys --keyid-format LONG
/c/Users/Jonas Damtoft/.gnupg/pubring.kbx
-----------------------------------------
sec   rsa4096/B41F1...... 2018-12-11 [SC]
      F135EB6.....
uid                 [ultimate] Jonas Holst Damtoft <[email protected]>
ssb   rsa4096/F2C06EECAEDD5C9B 2018-12-11 [E]
ssb   rsa4096/27B5..... 2018-12-11 [A]
[12:51:12.746] [DBG] ------------------------------
[12:51:12.749] [DBG] Starting pass-winmenu v1.9
[12:51:12.749] [DBG] ------------------------------
[12:51:12.926] [DBG] Config reloading enabled
[12:51:12.926] [DBG] Attempting to detect the GPG installation directory
[12:51:12.927] [DBG] GPG executable found at the configured path. Assuming installation dir to be C:\Users\Jonas Damtoft\Downloads\pass-winmenu\lib\GnuPG\bin
[12:51:13.068] [DBG] Calling GPG with "--version"
[12:51:13.181] [DBG] Using GPG version gpg (GnuPG) 2.2.6
[12:51:13.189] [DBG] Calling GPG with "--list-secret-keys"
[12:54:53.583] [DBG] Calling GPG with "--decrypt "C:\Users\Jonas Damtoft\passwordstore\au.gpg""
[12:54:53.623] [DBG] [GPG]: [GNUPG:] ENC_TO F2C06EECAEDD5C9B 1 0
[12:54:53.623] [DBG] [GPG]: gpg: encrypted with RSA key, ID F2C06EECAEDD5C9B
[12:54:53.623] [DBG] [GPG]: [GNUPG:] NO_SECKEY F2C06EECAEDD5C9B
[12:54:53.623] [DBG] [GPG]: [GNUPG:] BEGIN_DECRYPTION
[12:54:53.623] [DBG] [GPG]: [GNUPG:] DECRYPTION_FAILED
[12:54:53.623] [DBG] [GPG]: gpg: decryption failed: No secret key
[12:54:53.623] [DBG] [GPG]: [GNUPG:] END_DECRYPTION
[12:54:53.623] [DBG] [GPG]: [GNUPG:] FAILURE gpg-exit 33554433

Forward SSH passphrase requests to the user

If you use an SSH key with a passphrase, it's not possible to use the context menu options in pass-winmenu to synchronise your password repository. Because pass-winmenu launches Git without a shell, Git has no way to request your SSH passphrase, causing it to ignore any passphrase-protected keys, which means it won't be able to connect to the remote repository.

This will probably involve starting an SSH agent and requesting it to load an SSH key, as well as providing it with a passphrase.

SSH key could not be found

Once I start the application I get this warning in the Notification area:
image
I have a Pageant running and the key loaded there. I am able to push to my remote Git repository using git-bash and the key in Pageant:

MINGW64 ~/.password-store (master)
$ echo $GIT_SSH
C:\Program Files\PuTTY\plink.exe

MINGW64 ~/.password-store (master)
$ git remote -v
origin  git@.../password-store.git (fetch)
origin  git@.../password-store.git (push)

MINGW64 ~/.password-store (master)
$ git push --set-upstream origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 243 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To .../password-store.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.

How to build binaries

Hi,

not sure if this is an issue or I am missing something, but regarding to the description, there should be a binary file in the downloaded .zip file. But it's missing the bin or the instructions how to build it.

I checked the build.ps1 file but it looks like it just tries to copy some file from not existent ./bin folder.

line 35: cp "bin/Release/pass-winmenu.exe" "$PKGDIR/pass-winmenu.exe"

Any hint how to get this running is appreciated.

Allow viewing the full contents of a password file

Possibly by opening it in the user's default text editor. Probably requires the creation of a file containing the plaintext passwords. How to ensure it will be deleted after the editor is closed, no matter what?

Ctrl + Alt + P triggers exception if password store is empty

I do not have any passwords stored yet. I get the following exception when pressing Ctrl + Alt + P:
image
Here is the complete stack trace:

System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at PassWinmenu.Windows.PasswordSelectionWindow..ctor(IEnumerable`1 options, MainWindowConfiguration configuration)
   at PassWinmenu.Program.ShowPasswordMenu(IEnumerable`1 options)
   at PassWinmenu.Program.RequestPasswordFile()
   at PassWinmenu.Program.DecryptPassword(Boolean copyToClipboard, Boolean typeUsername, Boolean typePassword)
   at PassWinmenu.Program.<>c__DisplayClass14_0.<AssignHotkeys>b__0()
   at PassWinmenu.Hotkeys.HotkeyManager.HandleWndProc(Message& message)
   at PassWinmenu.Program.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Once I add a password, the exception no longer occurs.

Cut a new release

Wondering if you could cut a new release, or provide an easy way to compile the project. It's been a couple of commits since the last release, and i believe some of the issues i'm facing have been fixed on master.

Make "start with windows" a checkbox

Turn the "start with windows" menu item in the notifyicon menu into a checkbox.
Needs some additional checks to determine whether a link already exists and whether it points to the right location.

Improve startup times?

Triggering pass-winmenu with the key shortcut feels kinda slow. I have around 1000 entries (.gpg files) stored on a ram disk, and it takes like two seconds to show the prompt. Using rafi on Linux feels instantaneously on a slower computer.

Error message "The path is not of a legal form" when launching nogpg version

  • Installed latest version of Gpg4Win
  • Created an OpenPGP key pair
  • Downloaded latest nogpg version of the software from Github and copied to local disk
  • Updated a path to the .password-store in yaml file
  • Double-clicked on exe file and get the following below

pass-winmenu failed to start (ArgumentException: The path is not of a legal form.)

LibGit2Sharp requirement

It seems to require LibGit2Sharp library which is not mentioned in the docs. Some notes about it and any alternatives might be useful.

image

Donation link?

Donation link would be nice. This is a slick passmenu clone.

passphrase dialog has no focus when displayed

First of all thanks for this nifty tool. I am using this now and I like it a lot. Got one minor issue though. When I am prompted for passphrase after selecting my file, window has no focus. I have to click the dialog first before I can start typing my password.

Where to put custom config file

Somehow I can't find information on where to place a custom yaml-based configuration file. The README doesn't indicate where that file has to go to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.