OPNsense Forum
English Forums => Development and Code Review => Topic started by: rhyse on February 05, 2018, 11:31:56 pm
-
Hi
I am trying to create a simple plugin that takes a variable then outputs the output to the screen. I have tried bastardising teh arp-scanner plugin but seem to have got stuck (I am not a programmer/developer by any means)
Essentially I would like something similar to the traceroute / ping options under Interfaces -> Diagnostics.
But I can't find those under the opnsense/plugins git. If you want to look at my intial very poor attempt you can find it here https://github.com/rhysxevans/plugins/tree/master/security/nmap .
Any chance to get the code for the ping / traceroute "plugins" ?
Once I have the intial command one working , I can potentially look at adding checkboxes etc for the variables
Basically , I need a portscanner and os identifier (will look at extending this)
Any help is appreciated
Thansk
-
so you need nmap?
-
The ping code uses static pages, which you shouldn't use to build new components: more code, hard to maintain, no API.
Michael's blog has numerous step-by-step tutorials for building new plugins:
http://www.routerperformance.net/opnsense/create-a-new-plugin-from-scratch-by-example-pt-1-lldp/
For more see the "OPNsense" tab.
Cheers,
Franco
-
Hi
In short yes, for now. but there is a longer term aim of getting something like openvas into the system (note I dont know how feasible that is).
But baby steps for now
Franco - I will reread that link
Thanks
-
Ok, just to keep people updated. I haven't progressed any further on this due to time constraints. Primarily work related
So a not so simple question, what is the possibility of someone picking this up ? One option would be to convert the ping / traceroute pages static pages into default "plugins" - I could then "learn" from that (please note I am not a delveloper in any shape or form) and move forward from there
Other option is anyone willing to do this at a resonable cost (be it direct or via donation to the project)
I am thinking something similar to the pfsense nmap lugins options in the gui, but it could be as simple as a dns name or ip address to input initially.
I know MasterXBKC has attempted this, but has come across some blockers. I appreciate his efforts.
Apologies if this is not the way to go via this. If it is can someone please direct me to where I should be looking (i did google opnsense coders)
Thansk
-
You can use the code that MasterXBKC provided manually no problem and go from there.
It's in here... https://github.com/opnsense/plugins/pull/557/files
Cheers,
Franco