Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
NSE: add script for discovering OSPF neighbors #743
I'd like to contribute to the project by sharing a script for discovering OSPF neighbors.
To make the script work, I've made several additions to the ospf library, and also a small addition to ipOps. I've also considered to partially rewrite the ospf library using Lua native functions instead bin/bit, but I stopped because (maybe due to my poor Lua skills) I didn't found a convenient way to handle hex strings.
Comments are welcome! Thanks!
Ok, I've got the conflicts resolved, but I have one issue and question: All of our scripts should behave in a reasonable fashion if OpenSSL is not compiled in, so instead of
One option would be to check for OpenSSL in the script in the same way, and fail gracefully if
EDIT: I fixed the problem by changing the endianness in my nselib/ospf.lua, as Emyl suggested.
This output indicates that the hello timer sent by the script is 2560 instead of 10 (or 256 times the correct value) and the dead timer is 671088640 instead of 40 (or 16777216 times the correct value)
EDIT: After changing the endianness, I get the following output: