diff --git a/floss/main.py b/floss/main.py index a49edea73..e67f5a15c 100644 --- a/floss/main.py +++ b/floss/main.py @@ -598,7 +598,11 @@ def main(argv=None) -> int: if results.metadata.language not in ("", "unknown"): if args.enabled_types == [] and args.disabled_types == []: - prompt = input("Do you want to enable string deobfuscation? (this could take a long time) [y/N] ") + # when stdout is redirected, such as in 'floss foo.exe | less' use default prompt values + if sys.stdout.isatty(): + prompt = input("Do you want to enable string deobfuscation? (this could take a long time) [y/N] ") + else: + prompt = "n" if prompt.lower() == "y": logger.info("enabled string deobfuscation")