Skip to content

Commit

Permalink
httpx docs update (#68)
Browse files Browse the repository at this point in the history
* httpx dashboard docs update

* link update

---------

Co-authored-by: sandeep <[email protected]>
  • Loading branch information
mintlify[bot] and ehsandeep authored Sep 2, 2024
1 parent de9d564 commit 929fcd2
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 7 deletions.
16 changes: 10 additions & 6 deletions cloud/assets/adding-assets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ Assets can be added through either the Assets tab, or during the creation of a s

<img height="200" src="/images/platform/assetspage.png" />

From the Assets tab, there are two methods to add your assets:
From the Assets tab, there are three methods to add your assets:
- Add New Assets
- Connect Cloud Services
- HttpX Integration

Each unique path, including those with specified ports will be added as an individual asset for scanning. If you have questions about your specific setup, get in touch with us at [email protected].

## Add New Assets

Upload is the most basic method of getting assets into PDCP. To get started immediately, this is a straightforward way to add a single domain and start a scan.
Discovery is the most basic method of getting assets into PDCP. To get started immediately, this is a straightforward way to add a single domain and start a asset discovery.

<img height="200" src="/images/platform/addassets.png" />

- **Scope**: manually input your list, upload an existing list (.TXT) of up to 50,000 items, or add up to 50 root domains.
- **Scope**: manually input your list of up to 50 root domains.

- Auto Discovery is enabled by default and will automatically discover and add hosts (subdomains, open ports, and other web technologies).
- Auto Discovery is enabled by default and will automatically discover your assets including subdomains, open ports, and other web technologies.
- *Note: Disable Auto Discovery to restrict upload to your specified asset list.*

- Domain, IP address, or CIDR. For CIDR ranges each individual domain will be added as a single asset.
- Domain, IP address, or CIDR. For CIDR ranges each individual IP will be added as a single asset.

- **Advanced**: Turning off Auto Discovery disables all discovery settings.

- Use Advanced to modify individual discovery settings for subdomains, open ports, etc.

- Customize the frequency of Auto Discovery to continuously monitor for new assets.

<img height="200" src="/images/platform/assetsadvanced.png" />
Expand All @@ -49,6 +49,10 @@ Cloud connections can be configured to check for updates to your assets and ensu

For the majority of integrations, you only need to provide a name and the token or access details generated by the provider.

## HttpX Integration

See HttpX Integration [docs](https://docs.projectdiscovery.io/tools/httpx/running#ui-dashboard-pdcp-integration) and [blog](https://blog.projectdiscovery.io/introducing-httpx-dashboard-2/) for more details.

## Managing Assets

Once your assets are added successfully they display in the asset list.
Expand Down
1 change: 1 addition & 0 deletions tools/httpx/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ It can also be in a pipeline that transitions from asset identification to techn
- Smart auto-fallback from https to http
- Support for hosts, URLs and CIDR
- Handling for edge cases: retries, backoffs for WAFs
- UI Dashboard for results


## Additional httpx resources
Expand Down
97 changes: 96 additions & 1 deletion tools/httpx/running.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,102 @@ https://www.hackerone.com
https://resources.hackerone.com
https://api.hackerone.com
https://support.hackerone.com
```

## UI Dashboard (PDCP Integration)

#### Configure API Key

To upload your assets to PDCP you will need to create a free API Key

- **Obtain API Key:**

- Visit https://cloud.projectdiscovery.io
- Open the setting menu from the top right and select "API Key" to create your API Key
<img class="block" src="/images/pdcp-api-key.png" alt="PDCP API Key" />
- Use the `httpx -auth` command, and enter your API key when prompted.

#### Configure Team (Optional)

If you want to upload the asset results to a team workspace instead of your personal workspace, you can configure the Team ID. You can use either the CLI option or the environment variable, depending on your preference.

- **Obtain Team ID:**
- To obtain your Team ID, navigate to [https://cloud.projectdiscovery.io/settings/team](https://cloud.projectdiscovery.io/settings/team) and copy the Team ID from the top right section.

![image](https://github.com/user-attachments/assets/76a9f102-1626-4c87-8d9e-37c30417f19e)


- **CLI Option:**
- Use the `-tid` or `-team-id` option to specify the team ID.
- Example: `nuclei -tid XXXXXX -dashboard`

- **ENV Variable:**
- Set the `PDCP_TEAM_ID` environment variable to your team ID.
- Example: `export PDCP_TEAM_ID=XXXXX`

Either of these options is sufficient to configure the Team ID.

#### Run httpx with UI Dashboard

To run `httpx` and upload the results to the UI Dashboard:

```console
$ chaos -d hackerone.com | httpx -dashboard

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

projectdiscovery.io

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

![image](https://blog.projectdiscovery.io/content/images/size/w1600/2024/08/image.png)

#### Uploading to an Existing Asset Group

To upload new assets to an existing asset group:

```console
$ chaos -d hackerone.com | httpx -dashboard -aid existing-asset-id
```

#### Setting an Asset Group Name

To set a custom asset group name:

```console
$ chaos -d hackerone.com | httpx -dashboard -aname "Custom Asset Group"
```

### Additional upload options

- `-pd, -dashboard`: Enable uploading of `httpx` results to the ProjectDiscovery Cloud (PDCP) UI Dashboard.
- `-aid, -asset-id string`: Upload new assets to an existing asset ID (optional).
- `-aname, -asset-name string`: Set the asset group name (optional).
- `-pdu, -dashboard-upload string`: Upload `httpx` output file (jsonl) to the ProjectDiscovery Cloud (PDCP) UI Dashboard.

### Environment Variables

- `export ENABLE_CLOUD_UPLOAD=true`: Enable dashboard upload by default.
- `export DISABLE_CLOUD_UPLOAD_WARN=true`: Disable dashboard warning.
- `export PDCP_TEAM_ID=XXXXX`: Set the team ID for the ProjectDiscovery Cloud Platform.

## Expanded Examples

### Using httpx as a library
Expand Down Expand Up @@ -352,4 +446,5 @@ https://example.com [Example Domain This domain is for use in illustrative examp
```
httpx -u https://example.com -silent -body-preview=200 -strip=html
https://example.com [Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission. More information...]
```
```

0 comments on commit 929fcd2

Please sign in to comment.