Skip to main content

修复config加载yaml参数时,合并报错的问题

Project description

使用说明

DHCPv4 模拟发包支持

[root@localhost ~]# ./dhcptool v4 -h
20230322 10:42:28 | 获取本机IP: 192.168.31.135
usage: dhcptool v4 [-h] [--num NUM] [--dhcp_server DHCP_SERVER] [--filter FILTER] [--relay_forward RELAY_FORWARD] [--options OPTIONS] [--message_type MESSAGE_TYPE] [--iface IFACE] [--debug DEBUG] [--mac MAC]
                   [--sleep_time SLEEP_TIME]

optional arguments:
  -h, --help            show this help message and exit
  --num NUM, -n NUM     数量 例: dhcptool v4 -s 192.168.31.134 -n 10
  --dhcp_server DHCP_SERVER, -s DHCP_SERVER
                        DHCP服务器(单播) 例: dhcptool v4 -s 192.168.31.134
  --filter FILTER, -f FILTER
                        DHCP服务器(广播) 例: dhcptool v4 -f 192.168.31.134
  --relay_forward RELAY_FORWARD, -rf RELAY_FORWARD
                        填充giaddr 例: dhcptool v4 -s 192.168.31.134 -rf 192.168.31.1
  --options OPTIONS, -o OPTIONS
                        填充options 例: 格式:dhcptool v4 -s 192.168.31.134 -o [code]=[value]&[code]=[value] [dhcptool v4 -s 192.168.31.134 -o [12=yamu&7=1.1.1.1][82="eth 2/1/4:114.14 ZTEOLT001/1/1/5/0/1/000000000000001111111154
                        XE"][60=60:000023493534453……][55=12,7][50=192.168.31.199]
  --message_type MESSAGE_TYPE, -mt MESSAGE_TYPE
                        发送指定类型报文如 例: dhcptool v4 -s 192.168.31.134 -mt renew/release/decline/inform
  --iface IFACE, -i IFACE
                        指定网卡 例: dhcptool v4 -s 192.168.31.134 -i eth1
  --debug DEBUG, -debug DEBUG
                        调试日志 例: dhcptool v4 -s 192.168.31.134 -debug on/off
  --mac MAC, -mac MAC   指定mac 例: dhcptool v4 -f 192.168.11.181 -mac 9a:cf:66:12:99:d1
  --sleep_time SLEEP_TIME, -st SLEEP_TIME
                        分配完成后的阶段设置等待进入下一阶段 例: dhcptool v4 -f 192.168.11.181 -st 1 -mt renew/release/decline/inform

DHCPv6 模拟发包支持

[root@localhost ~]# ./dhcptool v6 -h
20230322 10:42:35 | 获取本机IP: 192.168.31.135
usage: dhcptool v6 [-h] [--num NUM] [--options OPTIONS] [--ipv6_src IPV6_SRC] [--message_type MESSAGE_TYPE] [--na_pd NA_PD] [--debug DEBUG] [--mac MAC] [--dhcp_server DHCP_SERVER] [--filter FILTER] [--relay_forward RELAY_FORWARD]
                   [--sleep_time SLEEP_TIME]

optional arguments:
  -h, --help            show this help message and exit
  --num NUM, -n NUM     数量 例: dhcptool v6 -f 1000:0:0:31::135 -n 10
  --options OPTIONS, -o OPTIONS
                        填充options 例: 格式:dhcptool v6 -f 1000:0:0:31::135 -o [code]=[value]&[code]=[value] [dhcptool v4 -s 192.168.31.134 -o [16=1f3……&14=][18="eth 2/1/4:114.14 ZTEOLT001/1/1/5/0/1/000000000000001111111154
                        XE"][60=60:000023493534453……][6=12,7][50=192.168.31.199]
  --ipv6_src IPV6_SRC, -src IPV6_SRC
                        指定ipv6源ip 例: dhcptool v6 -f 1000:0:0:31::135 -src 1000::31:350:9640:be36:46f6
  --message_type MESSAGE_TYPE, -mt MESSAGE_TYPE
                        发送指定类型报文如 例: dhcptool v6 -f 1000:0:0:31::135 -mt renew/release/decline
  --na_pd NA_PD, -np NA_PD
                        分配类型 例: dhcptool v6 -f 1000:0:0:31::135 -np na / pd / na/pd
  --debug DEBUG, -debug DEBUG
                        调试日志 例: dhcptool v4 -f 1000:0:0:31::135 -debug on/off
  --mac MAC, -mac MAC   指定mac 例: dhcptool v4 -f 1000:0:0:31::135 -mac 9a:cf:66:12:99:d1
  --dhcp_server DHCP_SERVER, -s DHCP_SERVER
                        中继单播发包 例: dhcptool v4 -s 1000:0:0:31::135 -rf 1000:0:0:31::1
  --filter FILTER, -f FILTER
                        DHCP服务器(广播) 例: dhcptool v4 -f 1000:0:0:31::135
  --relay_forward RELAY_FORWARD, -rf RELAY_FORWARD
                        中继地址 例: dhcptool v4 -f 1000:0:0:31::135 -rf 1000:0:0:31::1
  --sleep_time SLEEP_TIME, -st SLEEP_TIME
                        分配完成后的阶段设置等待进入下一阶段 例: dhcptool v4 -f 1000:0:0:31::135 -st 1 -mt renew/release/decline

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dhcptool-2023.8.28.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

dhcptool-2023.8.28.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file dhcptool-2023.8.28.1.tar.gz.

File metadata

  • Download URL: dhcptool-2023.8.28.1.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.9.12 Windows/10

File hashes

Hashes for dhcptool-2023.8.28.1.tar.gz
Algorithm Hash digest
SHA256 0cfc77f15d48988441ca57eae6d8110f27c492315fb53e4593f350c0a9cee238
MD5 2d5d19730aaf2f0d9d7df4289ba1f528
BLAKE2b-256 ed2df0b72682bb058f2166c08fa2bce6ca2400ce89fbaf751169eab13c91038f

See more details on using hashes here.

File details

Details for the file dhcptool-2023.8.28.1-py3-none-any.whl.

File metadata

  • Download URL: dhcptool-2023.8.28.1-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.9.12 Windows/10

File hashes

Hashes for dhcptool-2023.8.28.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf22c6598ee28d59391fa91eec02c58f4f60a10cd7ec556120ed888f068a5b4
MD5 bbad19ebb8be6701d416502eafe85404
BLAKE2b-256 c47607ae5e8a3e6c4581ce711a3306d7f9bba75c098f4eb006ad89a5534d27fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page