Skip to content

-cdn -json should return true or false #496

@brenocss

Description

@brenocss

httpx version:

v1.1.5

Current Behavior:

echo 'google.com' | httpx -cdn -json | jq .cdn

null

Expected Behavior:

echo 'google.com' | httpx -cdn -json | jq .cdn

false

Use case

echo 'google.com
hackerone.com' | httpx -json >> log.json

echo 'google.com
hackerone.com' | httpx -cdn -json >> log.json
# Get all hosts's that is from any cdn
cat log.json | jq 'select(.cdn==true).url'
# Get all hosts's that isn't from any cdn
cat log.json | jq 'select(.cdn==false).url'
# cat log.json | jq 'select(.cdn!=true).url' doesn't work because it returns null with or without the -cdn flag, getting invalid results 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions