mushorg / buttinsky

Botnet monitoring is a crucial part in threat analysis and often neglected due to the lack of proper open source tools. Our tool will provide an open source framework for automated botnet monitoring. The modular design will allow full customization of the used protocols, the monitoring clients behavior, how we log the collected information, processing of the data to analyze the botnets purpose, size and threat and how the monitoring task are distributed between dedicated nodes.
http://buttinsky.org
GNU General Public License v3.0
79 stars 27 forks source link

network settings file validator #19

Closed glaslos closed 11 years ago

glaslos commented 11 years ago

We need a way to validate a settings file according to the assigned protocol

glaslos commented 11 years ago

This might work: http://www.alexconrad.org/2011/10/json-validation.html

ihpd commented 11 years ago

Pls check this https://gist.github.com/4642802

ihpd commented 11 years ago

Both the parameters(port and reconn_attempts) are passed as string and not as int.

glaslos commented 11 years ago

Well I would prefer to have the as int from the beginning i.e. set in the configuration file. Do you have a reason why you want to have them as strings? Please add this to your pull request.

ihpd commented 11 years ago

I am fine with that . How would you want this to be integrated . Suggestion is to have it as a validate.py under modules.util and reference it for all json validations. Going forward we can also add http and other protocols.

Main reason why it was kept as a string was to avoid the initial errors, since the template.set file is currently passing both the parameters as string and it will fail on the validation part.

ihpd commented 11 years ago

With code being accepted this issue can be moved to closure.