Setting Up Your Development Environment
Your development environment must use Python 3.6.
You may use an IDE of your choice, such as Visual StudioCode (https://code.visualstudio.com/).
Use the following steps to configure and test your developer environment.
- Install Python 3.6
- Visit https://www.python.org/for downloads and installation instructions.
- Verify Python 3.6 is installed
- Open a terminal window and type: python -version
- Fork the stix-shifter project from https://github.com/opencybersecurityalliance/stix-shifter
- Clone the repo and create a new working branch:
- Copy the repo URL from the Clone menu in Github
- In the same terminal you cloned the repo, CD into the newly created repo directory.
- Create a virtual environment where you will run stix-shifter CLI commands. This will install all the python packages required by stix-shifter.
- Run the following in the terminal: virtualenv -p python3.6 --no-site-packages --distribute virtualenv && source virtualenv/bin/activate && pip install -r requirements-dev.txt
- Test your setup.
- Run the following in the terminal python main.py translate dummy query '{}' "[ipv4-addr:value = '0.0.0.0']"
- If everything is set up correctly you should see a translated query: {'queries': ["SELECT * FROM tableName WHERE (SourceIpV4 = '0.0.0.0' OR DestinationIpV4 = '0.0.0.0')"]}
Need Help?
Join one of the developer communities. Follow this link