h
p
i
ng
wiki
HOME
-
RECENT CHANGES
-
CONTACTS
-
DOWNLOAD
-
ANTIREZ
-
TCL BOOK
Differences for page
hping setfield
Current version compared with version
Tue May 18 04:46:02 GMT 2004
...
- `layer`/`field` returns an error.
+ `layer`/`field` returns an error.
+
The following is the old page content
{hping setfield `layer` `field` `value` `?skip?` `packet`} [hping setfield] is used to set a given field in a packet, it returns a new packet with the given field set to the specified value: hping3.0.0-alpha> hping setfield udp sport 2000 $packet ip(ihl=5,ver=4,tos=c0,totlen=58,id=62912,fragoff=0,mf=0,df=0,rf=0,ttl=64,proto=1,cksum=e500,saddr=192.168.1.7,daddr=192.168.1.6)+icmp(type=3,code=3,unused=0)+ip(ihl=5,ver=4,tos=00,totlen=30,id=60976,fragoff=0,mf=0,df=1,rf=0,ttl=64,proto=17,cksum=40c9,saddr=192.168.1.6,daddr=192.168.1.7)+udp(sport=2000,dport=10,len=10,cksum=94d6)+data(str=fa) So in order to modify a packet hold in a [Tcl] variable it is possible to write: set packet [hping setfield udp sport 2000 $packet] [hping setfield] can't add fields, so an attempt to set a non-existent `layer`/`field` returns an error.
Copyright (C) 2004 Salvatore Sanfilippo - Powered by
YakuWiki
and
Tcl/Tk