Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Seemingly Simple Plugin
« previous
next »
Print
Pages: [
1
]
Author
Topic: Seemingly Simple Plugin (Read 4439 times)
rhyse
Newbie
Posts: 14
Karma: 0
Seemingly Simple Plugin
«
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
Logged
MasterXBKC
Jr. Member
Posts: 66
Karma: 6
Infragard Member
Re: Seemingly Simple Plugin
«
Reply #1 on:
February 06, 2018, 01:52:23 am »
so you need nmap?
Logged
Member of FBIs Infragard Program
Certified Information Systems Security Officer
Certified Vulnerability Assessor
PFMonitor Remote Management, Backup, & Live Monitoring for PFSense and OPNSense
OPNSense Units: R720XD XL, R720XD XL, R720XD, R720XD, R710, DL360G7, QNAP
franco
Administrator
Hero Member
Posts: 17665
Karma: 1611
Re: Seemingly Simple Plugin
«
Reply #2 on:
February 06, 2018, 08:03:34 am »
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
Logged
rhyse
Newbie
Posts: 14
Karma: 0
Re: Seemingly Simple Plugin
«
Reply #3 on:
February 06, 2018, 08:05:48 am »
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
Logged
rhyse
Newbie
Posts: 14
Karma: 0
Re: Seemingly Simple Plugin
«
Reply #4 on:
February 28, 2018, 11:43:00 pm »
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
Logged
franco
Administrator
Hero Member
Posts: 17665
Karma: 1611
Re: Seemingly Simple Plugin
«
Reply #5 on:
March 01, 2018, 09:50:19 am »
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
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
Seemingly Simple Plugin