antirez 17May2004: This is the document about the hping3 API that's included in the current hping3 documentation.
I'm posting it in raw format for now but actually this should be Wikified.
Overview Hping uses the Tcl language as scripting language to write networking
and security related applications, test suites, and software prototypes.
To run hping in scripting mode just run it without arguments.
# hping
It will display a prompt, and will accept commands from the standard
input. Here you can write Tcl commands, and use the embedded
hping command to manipulate, send and receive packets, set filters,
read the interface list and so on.
To execute an hping script, call the hping program with "exec"
as first argument followed by the name of the script and
the arguments.
# hping exec hping.htcl www.hping.org
The goal of this document is to describe the API exported by hping
to the Tcl language. This document aims to be informative, but will
not cover all the aspects of the API usage: the experienced user
should be able to fully exploit the hping capabilities just reading
this document and the examples under the 'lib' directory.
Note that the API is not yet complete: this document only covers the
part already implemented in the current CVS version of hping3.
Also note that this document currently does NOT cover the hping standard
library, which is a higher level API build on top of the low-level API
(for low-level API I mean what's described in this document).
API basics
The main idea of the hping API is to export a single command for every
'section' of the facilities provided by hping.
The most important command exported is 'hping', this command
expects a subcommand that specify the operation to perform. The
following subcommands are currently available:
Most are to receive, send, and manage packets, and in general all the
subcommands of the hping command are about networking.
Click on the links to have more information about every specific command.
See also hpingstdlib.htcl for functions included in the standard library.
See also Parsing APD fields.
|