### Install Dependencies and Start Connector Source: https://github.com/opencti-platform/connectors/blob/master/external-import/shadowserver/README.md Installs Python dependencies and starts the Shadowserver connector manually. ```bash pip3 install -r requirements.txt ``` ```bash python3 main.py ``` -------------------------------- ### Start Manual Deployment Source: https://github.com/opencti-platform/connectors/blob/master/internal-import-file/import-file-yara/README.md Start the connector manually from the src directory after installing dependencies. ```shell python3 import-file-yara.py ``` -------------------------------- ### Start Manual Deployment Source: https://github.com/opencti-platform/connectors/blob/master/external-import/flashpoint/README.md Start the connector manually from the /src directory after installing dependencies and configuring the environment. ```shell python flashpoint.py ``` -------------------------------- ### Start Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/google-secops-siem-incidents/README.md Execute this command from the 'src' directory to start the connector after manual installation and dependency setup. ```shell python main.py ``` -------------------------------- ### Docker Quick Start Source: https://github.com/opencti-platform/connectors/blob/master/external-import/portspoof/README.md Use Docker Compose for a quick setup. Configure environment variables in a .env file. ```bash docker compose up -d ``` ```bash OPENCTI_URL=https://your-opencti-instance.com OPENCTI_TOKEN=your-api-token-here CONNECTOR_ID=$(uuidgen) RABBITMQ_URL=amqp://portspoof:password@localhost:5672/ ``` -------------------------------- ### Start Manual Deployment Source: https://github.com/opencti-platform/connectors/blob/master/external-import/anyrun-feed/README.md Start the ANY.RUN Feed connector manually from the `src` directory after configuring `config.yml` and installing dependencies. ```bash python3 anyrun_feed.py ``` -------------------------------- ### Start Manual Connector Source: https://github.com/opencti-platform/connectors/blob/master/external-import/cyber-campaign-collection/README.md Starts the connector script manually after setting up the configuration file and installing dependencies. ```bash python3 cyber_campaign_collection.py ``` -------------------------------- ### Local Python Environment Setup and Run Source: https://github.com/opencti-platform/connectors/blob/master/docs/05-code-quality-standards.md Steps to set up a Python virtual environment, install dependencies, and run a local connector. ```bash python3 -m venv venv source venv/bin/activate cd src pip install -r requirements.txt python main.py ``` -------------------------------- ### Install Dependencies and Run Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/trukno/README.md Installs required Python dependencies from requirements.txt and then starts the connector by running the main Python script. This is for manual deployment scenarios. ```bash pip3 install -r requirements.txt python3 main.py ``` -------------------------------- ### Start Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/accenture-acti/README.md Start the connector from the 'src' directory after installing dependencies and creating the config.yml file. ```bash python3 main.py ``` -------------------------------- ### Manual Installation Source: https://github.com/opencti-platform/connectors/blob/master/external-import/portspoof/README.md Install dependencies from requirements.txt and run the main script for manual installation. ```bash pip install -r src/requirements.txt ``` ```bash python src/main.py ``` -------------------------------- ### Manual Deployment Setup Source: https://github.com/opencti-platform/connectors/blob/master/external-import/email-intel-microsoft/README.md Sets up a Python virtual environment, installs dependencies, copies configuration files, and runs the connector manually. This is for local development or manual deployment scenarios. ```bash python3.12 -m venv venv && source venv/bin/activate pip install -r src/requirements.txt # or dev-requirements.txt cp config.yml.sample config.yml # edit values # or .env.sample .env python3 src/main.py ``` -------------------------------- ### Basic API Client Setup and Usage Source: https://github.com/opencti-platform/connectors/blob/master/external-import/google-ti-feeds/connector/src/utils/api_engine/README.md Demonstrates how to initialize the ApiClient with a RetryRequestStrategy and make a simple GET request. Ensure all necessary components like AioHttpClient and CircuitBreaker are configured before creating the strategy. ```python from utils.api_engine import ( ApiClient, RetryRequestStrategy, AioHttpClient, CircuitBreaker ) async def get_data(): # Create components http_client = AioHttpClient(default_timeout=30) circuit_breaker = CircuitBreaker(max_failures=5, cooldown_time=60) # Create strategy with retry configuration strategy = RetryRequestStrategy( http=http_client, breaker=circuit_breaker, max_retries=3, backoff=2 ) # Create API client client = ApiClient(strategy=strategy) # Make API call response = await client.call_api( url="https://api.example.com/data", method="GET", headers={"Authorization": "Bearer token"}, params={"limit": 10}, ) return response ``` -------------------------------- ### Local Connector Development Setup Source: https://github.com/opencti-platform/connectors/blob/master/templates/README.md This sequence sets up a Python virtual environment, installs dependencies, copies a sample configuration file, and then prompts the user to edit the configuration for OpenCTI URL, token, and connector ID before running the main Python script. ```shell $ virtualenv env $ source ./env/bin/activate $ pip install -r requirements $ cp config.yml.sample config.yml # Define the opencti url and token, as well as the connector's id $ vim config.yml $ python main.py ``` -------------------------------- ### Manual Setup and Execution of CybelAngel Connector Source: https://github.com/opencti-platform/connectors/blob/master/external-import/cybelangel/README.md Manually sets up the CybelAngel connector by copying the configuration file, installing dependencies, and running the Python script. Remember to edit the configuration file with your credentials. ```shell cp src/config.yml.sample src/config.yml # edit src/config.yml and fill in opencti.token, cybelangel.client_id, # cybelangel.client_secret, ... pip3 install -r src/requirements.txt python3 src/cybelangel.py ``` -------------------------------- ### Set Up Virtual Environment and Install Dependencies Source: https://github.com/opencti-platform/connectors/blob/master/external-import/dshield/README.md Create a Python virtual environment and install the necessary packages from requirements.txt. ```bash python3 -m venv venv source venv/bin/activate pip3 install -r requirements.txt ``` -------------------------------- ### Manual Deployment Steps Source: https://github.com/opencti-platform/connectors/blob/master/internal-enrichment/assemblyline/README.md Steps for manual deployment including configuration, dependency installation, and running the connector. ```bash cp src/config.yml.sample src/config.yml # edit src/config.yml and fill in opencti.token, assemblyline.url, # assemblyline.user, assemblyline.apikey, ... pip3 install -r src/requirements.txt python3 src/main.py ``` -------------------------------- ### Set Up Local Development Environment Source: https://github.com/opencti-platform/connectors/blob/master/internal-enrichment/qualys-cve-enrichment/README.md Create a Python virtual environment, activate it, install project dependencies, and run the main application script. ```bash python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows pip install -r src/requirements.txt cd src python main.py ``` -------------------------------- ### Installing Dependencies and Running from Source Source: https://github.com/opencti-platform/connectors/blob/master/internal-enrichment/qualys-cve-enrichment/README.md Steps to build the connector from source, including installing Python dependencies and executing the main script. ```bash cd qualys-cve-enrichment pip install -r src/requirements.txt cd src python main.py ``` -------------------------------- ### Start QRadar Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/stream/qradar/README.md Starts the QRadar connector script from the `src` directory. Ensure dependencies are installed and configuration is complete. ```bash python3 qradar.py ``` -------------------------------- ### Start Cisco SMA Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/cisco-sma/README.md Start the Cisco SMA connector manually from the 'src' directory. Ensure dependencies are installed and configuration is set up. ```bash python3 cisco_sma.py ``` -------------------------------- ### Start VirusTotal Livehunt Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/stream/virustotal-livehunt-rules/README.md Starts the connector script from the src directory using Python 3. Ensure dependencies are installed and configuration is set up. ```bash python3 virustotal_livehunt.py ``` -------------------------------- ### Create Virtual Environment and Install Dependencies Source: https://github.com/opencti-platform/connectors/blob/master/external-import/beaconbeagle/README.md Sets up a Python virtual environment and installs the necessary dependencies for the BeaconBeagle connector. ```bash # Folders for the connector and the connectors checkout mkdir -p /root/opencti/running-connectors/ mkdir -p /root/raw_src/ cd /root/raw_src/ git clone https://github.com/OpenCTI-Platform/connectors.git # Create the venv cd /root/opencti/running-connectors/ python3 -m venv --prompt "OCTI Connectors" /root/opencti/running-connectors/.octi_con_venv source /root/opencti/running-connectors/.octi_con_venv/bin/activate pip3 install -r /root/raw_src/connectors/external-import/beaconbeagle/src/requirements.txt nano /root/opencti/running-connectors/connector_beaconbeagle.sh ``` -------------------------------- ### Start SpyCloud Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/spycloud/README.md Start the SpyCloud connector manually by running the main Python script. This is an alternative to Docker deployment and requires dependencies to be installed. ```bash python main.py ``` -------------------------------- ### Start FT3 Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/ft3/README.md Starts the FT3 connector manually from the src directory using Python 3. Ensure dependencies are installed and configuration is set up. ```bash cd src python3 -m src ``` -------------------------------- ### Configure and Run Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/echocti/README.md Copy the sample configuration file, edit it with your settings, and then run the connector from the 'src' directory. Ensure Python is installed and accessible. ```bash cp src/config.yml.sample src/config.yml # Edit src/config.yml with your settings cd src python -m echocti ``` -------------------------------- ### Start Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/internal-enrichment/anyrun-task/README.md Start the Any.RUN Task connector manually using the Python client. This command should be executed from the `src` directory after dependencies are installed and configuration is complete. ```bash python3 opencti_client.py ``` -------------------------------- ### Python Logging Example Source: https://github.com/opencti-platform/connectors/blob/master/docs/02-external-import-specifications.md Enhance connector operations with detailed logging. This example demonstrates logging the start of an import run, the number of objects collected, and the duration of the process. ```python def process_message(self) -> None: self.helper.connector_logger.info("Starting import run") work_id = self.helper.api.work.initiate_work( self.helper.connect_id, friendly_name ) start_time = time.time() stix_objects = self._collect_intelligence() elapsed = time.time() - start_time self.helper.connector_logger.info( "Import completed", { "objects_collected": len(stix_objects), "duration_seconds": round(elapsed, 2) } ) # Send bundle and complete work... ``` -------------------------------- ### YAML Configuration Example Source: https://github.com/opencti-platform/connectors/blob/master/external-import/proofpoint-tap/README.md Provides a minimal example of a YAML configuration file for connector settings. ```yaml connector: id: "..." ``` -------------------------------- ### Run Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/dogesec-cyberthreatexchange/README.md Execute this command to start the connector after manual installation and configuration. Ensure 'config.yml' is properly set up. ```bash python connector.py ``` -------------------------------- ### Set Up Virtual Environment and Configure Connector Source: https://github.com/opencti-platform/connectors/blob/master/external-import/group-ib/README_dev.md Create a Python virtual environment, activate it, install project dependencies, and copy the sample configuration file. Edit the configuration to set the OpenCTI URL, token, and connector ID. ```sh $ virtualenv env $ source ./env/bin/activate $ pip3 install -r requirements $ cp config.yml.sample config.yml # Define the opencti url and token, as well as the connector's id $ vim config.yml $ python3 main.py ``` -------------------------------- ### Run Tenable Security Center Connector from Source Source: https://github.com/opencti-platform/connectors/blob/master/external-import/tenable-security-center/README.md Starts the Tenable Security Center connector application after installation from source code. ```shell python app.py ``` -------------------------------- ### Install and Initialize pyioga for Google Credentials Source: https://github.com/opencti-platform/connectors/blob/master/external-import/email-intel-imap/docs/gmail.md Use this command to install the pyioga tool and then initialize it to obtain a verified token. This process requires your downloaded credentials.json file and will output a verified_token.json file. Note that Firefox may not be compatible with this process. ```bash python3 -m pip install pyioga python3 -m pyioga init --client-secret-file {downloaded_credentials.json} --output-file {verified_token.json} ``` -------------------------------- ### Run Connector Manually Source: https://github.com/opencti-platform/connectors/blob/master/external-import/lastinfosec/README.md Execute the LastInfoSec connector script using Python 3. This command starts the connector process after manual setup. ```bash python3 lastinfosec.py ``` -------------------------------- ### Start Docker Environment Source: https://github.com/opencti-platform/connectors/blob/master/internal-enrichment/crowdsec/docs/DEVELOPER.md Navigate to the docker directory and start the Docker environment using Docker Compose. The --build flag ensures images are built if necessary. ```bash cd docker && docker-compose up -d --build ``` -------------------------------- ### Build and Run CybelAngel Connector with Docker Source: https://github.com/opencti-platform/connectors/blob/master/external-import/cybelangel/README.md Builds the CybelAngel connector Docker image and starts it using Docker Compose. Ensure you have Docker and Docker Compose installed. ```shell docker build . -t opencti/connector-cybelangel:latest docker compose up -d ``` -------------------------------- ### Manual Deployment Steps for Shodan Connector Source: https://github.com/opencti-platform/connectors/blob/master/internal-enrichment/shodan/README.md Instructions for manual deployment of the Shodan connector, including cloning the repository, creating a configuration file, installing dependencies, and running the main script. ```bash git clone cd shodan-connector cp config.yml.sample config.yml pip3 install -r requirements.txt python3 main.py ``` -------------------------------- ### Docker Compose Configuration for DShield Connector Source: https://github.com/opencti-platform/connectors/blob/master/external-import/dshield/README.md Example docker-compose.yml file for deploying the DShield connector. Customize the environment variables according to your OpenCTI setup and security requirements. ```yaml version: '3' services: connector-dshield: image: opencti/connector-dshield:latest environment: - OPENCTI_URL=http://localhost:8080 - OPENCTI_TOKEN=ChangeMe - CONNECTOR_ID=ChangeMe - CONNECTOR_NAME=DShield - CONNECTOR_SCOPE=dshield - CONNECTOR_LOG_LEVEL=info - CONNECTOR_DURATION_PERIOD=P1D - DSHIELD_API_BASE_URL=https://feeds.dshield.org/block.txt - DSHIELD_TLP_LEVEL=clear restart: always ``` -------------------------------- ### Start Connector Container Source: https://github.com/opencti-platform/connectors/blob/master/external-import/sublime/README.md Use this command to start the connector container after building it locally. ```bash docker compose up --build -d ```