From a27229a7b08eb13a23e82c11b885796d15d0b293 Mon Sep 17 00:00:00 2001 From: rabsondev Date: Mon, 18 Mar 2024 13:23:11 +0000 Subject: [PATCH] Update references to OXO --- README.md | 26 +++++++++++++------------- agent/ipwhois_data_handler.py | 1 + agent/whois_ip_agent.py | 1 + ostorlab.yaml | 24 ++++++++++++------------ tests/conftest.py | 1 + tests/whois_ip_agent_test.py | 1 + 6 files changed, 29 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index afe45c8..688b519 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ address._ agent-whois-ip

-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 @@ -24,33 +24,33 @@ for [ipwhois](https://pypi.org/project/ipwhois/). 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 @@ -62,10 +62,10 @@ 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. @@ -73,11 +73,11 @@ You can pass the optional flag `--organization` to specify your organisation. Th 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 diff --git a/agent/ipwhois_data_handler.py b/agent/ipwhois_data_handler.py index a4905b9..9061ea7 100644 --- a/agent/ipwhois_data_handler.py +++ b/agent/ipwhois_data_handler.py @@ -1,4 +1,5 @@ """Helper module for preparing the whois IP messages.""" + import ipaddress import logging from typing import Any, Dict, Union, Optional, List diff --git a/agent/whois_ip_agent.py b/agent/whois_ip_agent.py index 0f498cd..a8f9fef 100644 --- a/agent/whois_ip_agent.py +++ b/agent/whois_ip_agent.py @@ -1,4 +1,5 @@ """WhoisIP agent implementation that processes both DNS records and IP assets.""" + import ipaddress import logging import re diff --git a/ostorlab.yaml b/ostorlab.yaml index 9c22237..c10c674 100644 --- a/ostorlab.yaml +++ b/ostorlab.yaml @@ -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 @@ -49,10 +49,10 @@ 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. @@ -60,11 +60,11 @@ description: | 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 diff --git a/tests/conftest.py b/tests/conftest.py index 113e37a..d60a3d2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Pytest fixture for the WhoisIP agent.""" + import pathlib import random import json diff --git a/tests/whois_ip_agent_test.py b/tests/whois_ip_agent_test.py index 299f0b5..5225b0a 100644 --- a/tests/whois_ip_agent_test.py +++ b/tests/whois_ip_agent_test.py @@ -1,4 +1,5 @@ """Unittests for WhoisIP agent.""" + from typing import List, Dict import ipwhois