Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: httpx results dashboard #1834

Merged
merged 10 commits into from
Jul 26, 2024
Merged

feat: httpx results dashboard #1834

merged 10 commits into from
Jul 26, 2024

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented Jul 20, 2024

Proposed Changes

Probe and Upload

$ chaos  -silent -d hackerone.com | ./httpx -pd -aname 'h1-httpx'               

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

		projectdiscovery.io

[INF] Current chaos version 0.5.2 (latest)
[INF] Current httpx version v1.6.6 (latest)
[INF] To view results on UI dashboard, visit https://cloud.projectdiscovery.io/assets upon completion
http://b.ns.hackerone.com
https://mta-sts.managed.hackerone.com
http://a.ns.hackerone.com
https://mta-sts.hackerone.com
https://mta-sts.forwarding.hackerone.com
https://www.hackerone.com
https://api.hackerone.com
https://resources.hackerone.com
https://docs.hackerone.com
https://gslink.hackerone.com
https://support.hackerone.com
[INF] Found 11 results, View found results in dashboard : https://cloud.projectdiscovery.io/assets/cqdtislcjsac738c26cg

Upload Already Existing JSONL output file

$ ./httpx -pdu targets.jsonl -aname "pdu flag upload x 2"

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

		projectdiscovery.io

[INF] Current httpx version v1.6.6 (latest)
[INF] To view results in UI dashboard, visit https://cloud.projectdiscovery.io/assets upon completion.
[INF] Found 11 results, View found results in dashboard : https://cloud.projectdiscovery.io/assets/cqh4u1e3s8ks7394gu0g

jsonlinesfile is generated when -output targets.jsonl -j flags are used

Available Flags

$ ./httpx -h cloud
httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryablehttp library.

Usage:
  ./httpx [flags]

Flags:
CLOUD:
   -auth                           configure projectdiscovery cloud (pdcp) api key (default true)
   -pd, -dashboard                 upload / view output in projectdiscovery cloud (pdcp) UI dashboard
   -aid, -asset-id string          upload new assets to existing asset id (optional)
   -aname, -asset-name string      assets group name to set (optional)
   -pdu, -dashboard-upload string  upload httpx output file (jsonl) in projectdiscovery cloud (pdcp) UI dashboard

@tarunKoyalwar tarunKoyalwar self-assigned this Jul 20, 2024
@tarunKoyalwar tarunKoyalwar marked this pull request as ready for review July 20, 2024 15:37
@tarunKoyalwar tarunKoyalwar changed the title issue 1833 dashboard feat: httpx results dashboard Jul 20, 2024
@tarunKoyalwar tarunKoyalwar linked an issue Jul 20, 2024 that may be closed by this pull request
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Allow user to configure if missing / invalid API key upon -dashboard option in use.
echo example.com | httpx -pd 

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

		projectdiscovery.io

[INF] Current httpx version v1.6.6 (latest)
[ERR] ProjectDiscovery Cloud Platform (pdcp) API key is missing or invalid api key.
[INF] Get your free api key from https://cloud.projectdiscovery.io/?ref=api_key
[*] Enter PDCP API Key (exit to abort):
[INF] Successfully configured API as (@sandeep)
  • PDCP_API_SERVER env is not configurable, below example still make api call to prod api.
PDCP_API_SERVER=https://api.dev.projectdisocvery.io HTTPS_PROXY=http://127.0.0.1:8080  ./httpx -pd -l test.txt
  • Add option to upload local httpx output file (jsonl only)
-pdu, -dashboard-upload  upload httpx output file (jsonl) in projectdiscovery cloud (pdcp) UI dashboard

Example:

htttpx -dashboard-upload output_file -silent
[INF] Uploaded 11 results, View uploaded results in UI dashboard : https://cloud.projectdiscovery.io/assets/cqed72mbh6us73bj4o3g

Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ PDCP_API_KEY=XXX PDCP_API_SERVER=https://api.dev.projectdiscovery.io ./httpx -pdu test_output

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

		projectdiscovery.io

[INF] Current httpx version v1.6.6 (latest)
[INF] To view results in UI dashboard, visit https://cloud.projectdiscovery.io/assets upon completion.
[INF] Found 11 results, View found results in dashboard : https://cloud.projectdiscovery.io/assets/cqh57m9htlrs73be80og
$ chaos -d hackerone.com | PDCP_API_KEY=XXX PDCP_API_SERVER=https://api.dev.projectdiscovery.io ./httpx -dashboard

    __    __  __       _  __
   / /_  / /_/ /_____ | |/ /
  / __ \/ __/ __/ __ \|   /
 / / / / /_/ /_/ /_/ /   |
/_/ /_/\__/\__/ .___/_/|_|
             /_/

		projectdiscovery.io

[INF] Current httpx version v1.6.6 (latest)
[INF] To view results in UI dashboard, visit https://cloud.projectdiscovery.io/assets upon completion.
https://mta-sts.managed.hackerone.com
https://mta-sts.forwarding.hackerone.com
https://mta-sts.hackerone.com
http://a.ns.hackerone.com
https://api.hackerone.com
https://www.hackerone.com
https://docs.hackerone.com
https://gslink.hackerone.com
https://support.hackerone.com
http://b.ns.hackerone.com
https://resources.hackerone.com
[INF] Found 11 results, View found results in dashboard : https://cloud.projectdiscovery.io/assets/cqh56s9htlrs73be80o0
image

@ehsandeep ehsandeep requested a review from Mzack9999 July 25, 2024 13:38
@ehsandeep ehsandeep merged commit 63b64cb into dev Jul 26, 2024
11 checks passed
@ehsandeep ehsandeep deleted the issue-1833-dashboard branch July 26, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for -dashboard option
3 participants