Re: How to send a sequence of bytes

Michel Arboi <[email protected]>
Newsgroups gmane.comp.security.nessus.general
Organization Nessus.org
Message-ID <20080615130155.4966bbb6@casserole>
On Thu, 22 May 2008 18:21:13 +0200
"Renaud Deraison (lists)" <[email protected]> wrote:

> On May 22, 2008, at 6:15 PM, John Chajecki wrote:
> > Here is my code.
> > pktdata = '
> > 0x31,0x00,0x30,0x00,0x33,0x00,0x3b,0x00,0x38,0x00,0x36,0x00,0x3b,0x00,
> > 0x31,0x00,0x2e,0x00,0x30,0x00,0x2e,0x00,0x30,0x00,0x2e, 
> > 0x00,0x30,0x00';
 
> It should really be :
> pktdata = raw_string(0x31, 0x00, ....); (no quotes).

Or:
pktdata = '\x31\x00\x30\x00\x33\x00\x3b\x00\x38\x00\x36\x00\x3b\x00\x31\x00\x2e\x00\x30\x00\x2e\x00\x30\x00\x2e\x00\x30\x00';

But the raw_string construction is probably more readable if the string is long.
_______________________________________________
Nessus mailing list
[email protected]
http://mail.nessus.org/mailman/listinfo/nessus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.