Nmap Development mailing list archives
Re: payload file prototype
From: Jay Fink <jay.fink () gmail com>
Date: Thu, 11 Feb 2010 21:43:57 -0500
On Wed, Feb 10, 2010 at 12:23 AM, David Fifield <david () bamsoftware com> wrote:
I was thinking to use an std::map<proto_port, Payload> for the global list of payloads, where proto_port would be like struct proto_port { u8 proto; u16 port; };
Okay so that would be mapped into the global list or are you referring when were looking it up? Right now, for the actual list itself, following is what I banged out last weekend. It is missing search and init but here is the header file for it, I trimmed out everything else, the functions listed (including constructor) work, some of them are just for practice at this point and might get tossed. My current test program initializes 3 payloads inside the calling test itself. I am planning on using something similar to services to load up the file in the init portion. The next steps are load, then search (map): struct Payload { char *proto; // number? int dport; // dest port char *data; // Payload data int sport; // source port if we care Payload* next; // next payload }; class AllPayloads { public: AllPayloads(); ~AllPayloads(); int Count(); Payload* head; int Add(Payload* Item); Payload *Retrieve(int pos); bool Find(Payload* Item); private: int size; }; thanks, j _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- payload file prototype Jay Fink (Jan 18)
- Re: payload file prototype David Fifield (Jan 29)
- Re: payload file prototype Jay Fink (Jan 29)
- Re: payload file prototype Jay Fink (Jan 31)
- Re: payload file prototype David Fifield (Feb 01)
- Re: payload file prototype Jay Fink (Feb 01)
- Re: payload file prototype Jay Fink (Feb 04)
- Re: payload file prototype David Fifield (Jan 29)
- <Possible follow-ups>
- Re: payload file prototype David Fifield (Feb 09)
- Re: payload file prototype Jay Fink (Feb 11)
- Re: payload file prototype David Fifield (Feb 12)
- Re: payload file prototype Jay Fink (Feb 12)
- Re: payload file prototype Jay Fink (Feb 14)
- Re: payload file prototype David Fifield (Feb 15)
- Re: payload file prototype Jay Fink (Feb 16)
- Re: payload file prototype Jay Fink (Feb 18)
- Re: payload file prototype David Fifield (Feb 19)
- Re: payload file prototype Jay Fink (Feb 11)