View previous topic :: View next topic |
Author |
Message |
lorenb Apprentice
Joined: 24 Aug 2002 Posts: 207 Location: Toronto, ON
|
Posted: Mon Dec 15, 2003 1:16 am Post subject: Python Programming Advice Needed |
|
|
I'm working on a project called Sussen. The short description of what it does:
Quote: |
Sussen is a security scanner which remotely tests computers or other devices and provides a report on their vulnerabilities. It features Python-based security tests, a GNOME interface, a GNOME-DB backend, and customizable reports.
|
The project started as new client for Nessus but along the way changed direction into a complete security scanner. The Sussen project now is composed of three parts: sussen client, sussen-sensor and sussen-plugins. The client sends commands to the sensor which in turn performs port scans, executes plugins, etc.
The client and sensor are written in C. The plugins are written in Python. The sensor embeds Python into itself; that is how the plugins are run.
I'm looking for some advice on the interface between the sensor and the Python based plugins.
I'm thinking the sensor will pass a list of open ports/services to the plugin. The plugin will determine if any of the services need to be examined and if so will perform its' test(s). Then I need to pass back results (pass/fail) and any extra information (banners,location of files it might have downloaded,etc.)
From reading the Python docs, it sounds like I could use a class as a kind of C-like struct? Is there a better way? Or a different data type(s) I could use instead?
I'm still new to Python and feeling my way around the language. |
|
Back to top |
|
|
far Guru
Joined: 10 Mar 2003 Posts: 394 Location: Stockholm, Sweden
|
Posted: Mon Dec 15, 2003 9:27 am Post subject: Re: Python Programming Advice Needed |
|
|
lorenb wrote: | I'm thinking the sensor will pass a list of open ports/services to the plugin.
[...]
From reading the Python docs, it sounds like I could use a class as a kind of C-like struct? Is there a better way? Or a different data type(s) I could use instead? |
I've never tried to mix C and python, but given that python is so easy and flexible, I think you should do what makes the most sense from the C point of view.
You could certainly use a class, but that would only make sense if you have a fixed number of named entries. The best solution is probably to pass a list, or, if you have a unique name or number for each entry, a dictionary. _________________ The Porthole Portage Frontend |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|