Skip to content

Commit

Permalink
Update references to OXO
Browse files Browse the repository at this point in the history
  • Loading branch information
rabsondev committed Mar 18, 2024
1 parent ab54742 commit a27229a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,41 @@ address._
<img src="https://github.com/Ostorlab/agent_whois_ip/blob/main/images/logo.png" alt="agent-whois-ip" />
</p>

This repository is an implementation of [Ostorlab Agent](https://pypi.org/project/ostorlab/)
This repository is an implementation of [OXO Agent](https://pypi.org/project/ostorlab/)
for [ipwhois](https://pypi.org/project/ipwhois/).

## Getting Started

To perform your first scan, simply run the following command.

```shell
ostorlab scan run --install --agent agent/ostorlab/whois_ip ip 8.8.8.8
oxo scan run --install --agent agent/ostorlab/whois_ip ip 8.8.8.8
```

This command will download and install `agent/ostorlab/whois_ip`.
For more information, please refer to
the [Ostorlab Documentation](https://github.com/Ostorlab/ostorlab/blob/main/README.md)
the [OXO Documentation](https://oxo.ostorlab.co/docs)

## Usage

Agent Whois can be installed directly from the ostorlab agent store or built from this repository.
Agent Whois can be installed directly from the oxo agent store or built from this repository.

### Install directly from ostorlab agent store
### Install directly from oxo agent store

```shell
ostorlab agent install agent/ostorlab/whois_ip
oxo agent install agent/ostorlab/whois_ip
```

You can then run the agent with the following command:

```shell
ostorlab scan run --agent agent/ostorlab/whois_ip domain-name tesla.com
oxo scan run --agent agent/ostorlab/whois_ip domain-name tesla.com
```

### Build directly from the repository

1. To build the whois_ip agent you need to have [ostorlab](https://pypi.org/project/ostorlab/) installed in your
machine. if you have already installed ostorlab, you can skip this step.
1. To build the whois_ip agent you need to have [oxo](https://pypi.org/project/ostorlab/) installed in your
machine. if you have already installed oxo, you can skip this step.

```shell
pip3 install ostorlab
Expand All @@ -62,22 +62,22 @@ pip3 install ostorlab
git clone https://github.com/Ostorlab/agent_whois_ip.git && cd agent_whois_ip
```

3. Build the agent image using ostorlab cli.
3. Build the agent image using oxo cli.

```shell
ostorlab agent build --file=ostorlab.yaml
oxo agent build --file=ostorlab.yaml
```

You can pass the optional flag `--organization` to specify your organisation. The organization is empty by default.

1. Run the agent using on of the following commands:
* If you did not specify an organization when building the image:
```shell
ostorlab scan run --agent agent//whois_ip ip 8.8.8.8
oxo scan run --agent agent//whois_ip ip 8.8.8.8
```
* If you specified an organization when building the image:
```shell
ostorlab scan run --agent agent/[ORGANIZATION]/whois_ip ip 8.8.8.8
oxo scan run --agent agent/[ORGANIZATION]/whois_ip ip 8.8.8.8
```

## License
Expand Down
1 change: 1 addition & 0 deletions agent/ipwhois_data_handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper module for preparing the whois IP messages."""

import ipaddress
import logging
from typing import Any, Dict, Union, Optional, List
Expand Down
1 change: 1 addition & 0 deletions agent/whois_ip_agent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""WhoisIP agent implementation that processes both DNS records and IP assets."""

import ipaddress
import logging
import re
Expand Down
24 changes: 12 additions & 12 deletions ostorlab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@ description: |
To perform your first scan, simply run the following command.
```shell
ostorlab scan run --install --agent agent/ostorlab/whois_ip ip 8.8.8.8
oxo scan run --install --agent agent/ostorlab/whois_ip ip 8.8.8.8
```
This command will download and install `agent/ostorlab/whois_ip`.
For more information, please refer to
the [Ostorlab Documentation](https://github.com/Ostorlab/ostorlab/blob/main/README.md)
the [OXO Documentation](https://oxo.ostorlab.co/docs)
## Usage
Agent Whois can be installed directly from the ostorlab agent store or built from this repository.
Agent Whois can be installed directly from the oxo agent store or built from this repository.
### Install directly from ostorlab agent store
### Install directly from oxo agent store
```shell
ostorlab agent install agent/ostorlab/whois_ip
oxo agent install agent/ostorlab/whois_ip
```
You can then run the agent with the following command:
```shell
ostorlab scan run --agent agent/ostorlab/whois_ip domain-name tesla.com
oxo scan run --agent agent/ostorlab/whois_ip domain-name tesla.com
```
### Build directly from the repository
1. To build the whois_ip agent you need to have [ostorlab](https://pypi.org/project/ostorlab/) installed in your
machine. if you have already installed ostorlab, you can skip this step.
1. To build the whois_ip agent you need to have [oxo](https://pypi.org/project/ostorlab/) installed in your
machine. If you have already installed oxo, you can skip this step.
```shell
pip3 install ostorlab
Expand All @@ -49,22 +49,22 @@ description: |
git clone https://github.com/Ostorlab/agent_whois_ip.git && cd agent_whois_ip
```
3. Build the agent image using ostorlab cli.
3. Build the agent image using oxo cli.
```shell
ostortlab agent build --file=ostorlab.yaml
oxo agent build --file=ostorlab.yaml
```
You can pass the optional flag `--organization` to specify your organisation. The organization is empty by default.
1. Run the agent using on of the following commands:
* If you did not specify an organization when building the image:
```shell
ostorlab scan run --agent agent//whois_ip domain-name tesla.com
oxo scan run --agent agent//whois_ip domain-name tesla.com
```
* If you specified an organization when building the image:
```shell
ostorlab scan run --agent agent/[ORGANIZATION]/whois_ip ip 8.8.8.8
oxo scan run --agent agent/[ORGANIZATION]/whois_ip ip 8.8.8.8
```
## License
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Pytest fixture for the WhoisIP agent."""

import pathlib
import random
import json
Expand Down
1 change: 1 addition & 0 deletions tests/whois_ip_agent_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unittests for WhoisIP agent."""

from typing import List, Dict

import ipwhois
Expand Down

0 comments on commit a27229a

Please sign in to comment.