Skip to content

--log-json is not valid json if the targets input file is empty #288

@adubaldo

Description

@adubaldo

Issue:
version: 0.4.9
os: parrot
description: whatweb --log-json write an open square brackets " [ " in json output file if the input file ( -i ) does not contains targets.

Use case:
Running a custom script you may need to pass an output file containing a list of websites to whatweb.

Workaround
For sure this issue should be handled by developers who uses whatweb.

Example:

root@parrot:/tmp# cat websites.txt  # empty file
root@parrot:/tmp# whatweb --log-json=testwhatweb.json -i websites.txt 
No targets selected
root@parrot:/tmp# cat testwhatweb.json 
[
root@parrot:/tmp# 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions