|
I have
also posted this issue on the [EMAIL PROTECTED]
mailing list, still don't have an answer.
Would
*really* appreciate if someone can point to me how to take advantage of
set_ip_elements(), set_tcp_elements(), set_udp_elements() functions.
They are too important tools in forging packets, I think, to have sneaked
in as bugs so far...
Thanks,
Gabriela.
-----Original Message-----
From: Gabriela Dinescu [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 4:48 PM To: '[EMAIL PROTECTED]' Subject: how to use set_ip_elements()? Sensitivity: Confidential Hi,
I'm in the process
of writing my first plugin in NASL, and have noticed the set_ip_elements()
function doesn't seem to behave as per documentation:
**************************************************
set_ip_elements( ip
: <ip_variable>,
[ip_hl : <ip_hl>, ] [ip_v : <ip_v>, ] [ip_tos : <ip_tos>,] [ip_len : <ip_len>,] [ip_id : <ip_id>, ] [ip_off : <ip_off>,] [ip_ttl : <ip_ttl>,] [ip_p : <ip_p>, ] [ip_src : <ip_src>,] [ip_dst : <ip_dst>,] [ip_sum : <ip_sum> ] ); The function set_ip_elements() change the value of the IP packet <ip_variable> and recomputes the checksum if the element ip_sum is not altered. Since this function will not create a new packet in memory, you should prefer it to forge_ip_packet() when you have to send multiple, nearly similar, IP packets. **************************************************
In other words, I couldn't get it to modify
any of the fields of an IP header (has similar unsuccessful results with
set_tcp_elements()... ). I have assumed I must be missing something, since
several existing plugins make use of the above... That doesn't seem be the case,
tough. I've launched teardrop.nasl individually, from a CLI -
dump_ip_packet() will return the same information before and after a call to
set_ip_elements()...
Any pointers are very much appreciated.
Thanks,
Gabriela.
|
