Skip to content

Handling prompts from tools is very fragile #76

Description

@ChrisJefferson

dtrx tries to detect if a tool is asking for a password, so it can prompt the user. It does this by searching output for password prompts in the output.

The problem is that prompts can occur for other reasons, for example ( #57 ), also i hit this myself with an invalid filename. When this happens dtrx just silently hangs, it doesn't tell the user anything is wrong, as it swallows all output.

I have tried various ways to fix this, but the problem is it's not easy to tell the difference between being prompted, or the tool just waiting for a long extraction. I can only see (I think) 2 sensible options:

  1. Play wack-a-mole, trying to detect every possible prompt that could come up.

  2. Switch by default to not dynamically requesting passwords (this would be a break in existing behaviour). We can still capture the original behaviour by noticing the password prompt and encouraging users to pass the -p flag when they reinvoke dtrx (or, we could even add an explicit '--interactive', which would just show all the output from the tool, so users could respond to any prompt. I wouldn't turn this on by default because it would produce a lot of output.

(2) would break backwards compatability (removing the interactive password prompt).

@noahp , do you have any opinion on this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions