Skip to content

Latest commit

 

History

History
69 lines (63 loc) · 2.23 KB

README.md

File metadata and controls

69 lines (63 loc) · 2.23 KB

Installation for Windows

It is a requirement to have both Git and Python3 installed and in your $PATH.

You may also need to set execution policy to unrestricted in order to create/activate a Python3 virtual environment.

Virtualenv (recommended):

# clone PyOTI repository and copy sample keys file
git clone https://github.com/RH-ISAC/PyOTI "$env:USERPROFILE\PyOTI"
Set-Location -Path "$env:USERPROFILE\PyOTI"
Copy-Item "$env:USERPROFILE\PyOTI\examples\keys.py.sample" -Destination "$env:USERPROFILE\PyOTI\examples\keys.py"
# install/setup virtual environment
Set-ExecutionPolicy Unrestricted -Force
py -m pip install virtualenv
py -m venv venv
.\venv\Scripts\Activate.ps1
# make sure to fill in your API secrets!
notepad "$env:USERPROFILE\PyOTI\examples\keys.py"
# install PyOTI library
py -m pip install .

Important Note:

If you are using SSL inspection/MITM proxy and having issues running PyOTI, try appending your root certificate to the following file:

$env:USERPROFILE\PyOTI\venv\Lib\site-packages\certifi\cacert.pem

No virtualenv:

# clone PyOTI repository and copy sample keys file
git clone https://github.com/RH-ISAC/PyOTI "$env:USERPROFILE\PyOTI"
Set-Location -Path "$env:USERPROFILE\PyOTI"
Copy-Item "$env:USERPROFILE\PyOTI\examples\keys.py.sample" -Destination "$env:USERPROFILE\PyOTI\examples\keys.py"
# make sure to fill in your API secrets!
notepad "$env:USERPROFILE\PyOTI\examples\keys.py"
# install PyOTI library
py -m pip install .

Updating for Windows

Virtualenv:

# activate virtual environment
Set-ExecutionPolicy Unrestricted -Force
Set-Location -Path "$env:USERPROFILE\PyOTI"
.\venv\Scripts\Activate.ps1
# pull PyOTI repository and update keys
git pull
powershell .\update_keys.ps1 
# make sure to fill in your updated API secrets!
notepad "$env:USERPROFILE\PyOTI\examples\keys.py"
# make sure PyOTI library is updated
py -m pip install .

No virtualenv:

# pull PyOTI repository
Set-ExecutionPolicy Unrestricted -Force
Set-Location -Path "$env:USERPROFILE\PyOTI"
git pull
powershell .\update_keys.ps1 
# make sure to fill in your updated API secrets!
notepad "$env:USERPROFILE\PyOTI\examples\keys.py"
# make sure PyOTI library is updated
py -m pip install .