Skip to content

-cdn -json should return true or false #496

Closed

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 

Activity

  1. added
    Type: Bug
    on Jan 13, 2022
  2. ehsandeep commented on Jan 14, 2022

    @ehsandeep
    Member

    @brenocss this feature will be updated with #492, so instead of returning true/false, it will return the name of the cdn.

  3. removed
    Type: Bug
    on Jan 14, 2022
  4. locked and limited conversation to collaborators on Jan 14, 2022
  5. converted this issue into a discussion #497 on Jan 14, 2022
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