the FASTEST way to deploy a REST prediction API
https://csirtgadgets.com/commits/2018/3/8/hunting-for-suspicious-domains-using-python-and-sklearn
https://csirtgadgets.com/commits/2018/3/30/hunting-for-threats-like-a-quant
https://csirtgadgets.com/commits/2018/4/20/predicting-attacks-with-python-and-sklearn
$ docker run -p 5000:5000 csirtgadgets/csirtg-predictd:latest
$ sudo [apt-get|brew|yum] install geoipupdate # ubuntu16 or later, requires python3
$ sudo cp GeoIP.conf /etc/GeoIP.conf
$ sudo geoipupdate -v
$ easy_install distribute
$ pip3 install -r dev_requirements.txt
$ python3 setup.py develop
$ csirtg-predictd -d --fdebug
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 974-602-805
Navigate to http://localhost:5000
Or use curl
$ curl localhost:5000/domain/?q=google.com
{
"data": "0"
}
$ curl localhost:5000/domain/?q=go0gle.com
{
"data": "1"
}
$ curl localhost:5000/ip/?q=141.142.164.33
{
"data": "0"
}
$ curl localhost:5000/ip/?q=122.2.223.242,6 # ip, hour of day observed [optional]
{
"data": "1"
}