Risk Analyzer is a python based server module that takes an IP address & returns a risk score in range of 0 to 100. It is an integral part of Intrusion Detection System project & will be used to make authorization decisions based on it's risk analysis of the client IP address.
To clone the project in your local systems:
$ git clone https://github.com/piyush-palta/risk-analyzer.git
Make sure you have installed all of the following prerequisites on your development machine:
- Git - Download & Install Git. OSX and Linux machines typically have this already installed.
- Python - Download & Install Python. For linux machines, you can also use this Python Docs to install Python.
- pip - Download & Install pip. Make sure you've installed python first.
The below command will start the riskAnalyzer server :
$ python main.py
To configure host and port by yourself :
$ python main.py host_name port_number
Before running tests make sure you execute the following command. This will ensure all files are compiled :
$ python main.py
To run all tests, run the following command in project directory :
$ python -m unittest
This will test all components. But before running this command it's essential that you start the server using following command :
$ python main.py
To run each test separately :
$ python -m unittest test_name.py
- The project isn't optimized for scaling purposes yet. Server is opening only one socket, and Synchronous processing is done. To optimize this, threading will be introduced.
The below image illustrates the architecture of Risk Analyzer server :