CyberShadow/dhcptest


Cross-platform DHCP test client

http://blog.thecybershadow.net/2013/01/10/dhcp-test-client

Language: D


dhcptest

This is a DHCP test tool. It can send DHCP discover packets, and listen for DHCP replies.

The tool is cross-platform, although you will need to compile it yourself for non-Windows platforms.

The tool is written in the D Programming Language.

Download

You can download a compiled Windows executable from my website, here.

Usage

By default, dhcptest starts in interactive mode. It will listen for DHCP replies, and allow sending DHCP discover packets using the "d" command. Type help in interactive mode for more information.

If you do not receive any replies, try using the --bind option to bind to a specific local interface.

The program can also run in automatic mode if the --query switch is specified on the command line. The program has a number of switches - run dhcptest --help to see a list.

An example command line to automatically send a discover packet and explicitly request option 43, wait for a reply, then print just that option:

dhcptest --quiet --query --request 43 --print-only 43

Query mode will report the first reply recieved. To automatically send a discover packet and wait for all replies before the timeout, use --wait. For additional resilience against dropped packets on busy networks, consider using the --retry and --timeout switches:

dhcptest --quiet --query --wait --retry 5 --timeout 10

You can spoof the Vendor Class Identifier, or send additional DHCP options with the request packet, using the --option switch:

dhcptest --query --option "60=Initech Groupware"

See RFC 2132 for a list and description of DHCP options.

License

dhcptest is available under the Boost Software License 1.0.

Changelog

dhcptest v0.6 (TBD)

  • Add --secs switch
  • Contributed by Darren White:
    • Add --wait switch
    • The --print-only switch now understands output formatting: --print-only "N[hex]" will output the value as a zero padded hexadecimal string of bytes. --print-only "N[ip]" will output the value as an IP address.

dhcptest v0.5 (2014-11-26)

  • The --option switch now understands hexadecimal or IPv4-dotted-quad formatting:
    --option "N[hex]=XX XX XX ..." or --option "N[IP]=XXX.XXX.XXX.XXX"

dhcptest v0.4 (2014-07-21)

  • Add switches: --retry, --timeout, --option

dhcptest v0.3 (2014-04-05)

  • Add switches: --mac, --quiet, --query, --request, --print-only
  • Print program messages to standard error

dhcptest v0.2 (2014-03-25)

  • License under Boost Software License 1.0
  • Add documentation
  • Add --help switch
  • Add --bind switch to specify the interface to bind on
  • Print time values in human-readable form
  • Heuristically detect and print ASCII strings in unknown options
  • Add option names from RFC 2132
  • Add help and quit commands
  • Add MAC address option to discover command

dhcptest v0.1 (2013-01-10)

  • Initial release

Project Statistics

Sourcerank 6
Repository Size 71.3 KB
Stars 135
Forks 32
Watchers 19
Open issues 2
Dependencies 0
Contributors 2
Tags 8
Created
Last updated
Last pushed

Top Contributors See all

Vladimir Panteleev Darren White

Recent Tags See all

0.7 August 03, 2017
v0.6 August 02, 2017
0.6 August 02, 2017
0.5 November 26, 2014
0.4 July 21, 2014
0.3 April 05, 2014
0.2 March 25, 2014
0.1 January 10, 2013

Interesting Forks See all

DarrenWhite99/dhcptest
Cross-platform DHCP test client
D - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2016-05-27 18:19:48 UTC

Login to resync this repository