sendpkt-rs

Crates.iosendpkt-rs
lib.rssendpkt-rs
version0.1.1
sourcesrc
created_at2020-07-28 14:46:34.092764
updated_at2020-07-28 14:54:21.06667
descriptionsend tcp packet from cli
homepage
repositoryhttps://github.com/detailyang/sendpkt-rs
max_upload_size
id270468
size27,124
detailyang (detailyang)

documentation

README

sendpkt-rs

sendpkt-rs send the TCP Packet from cli

Purpose

kill the quiet TCP connection (CLOSE-WAIT status) by sending the RST segment.

Sendpkt-rs

sendpkt-rs is a command line tool to send TCP Packet with specified option as the following:

USAGE:
    sendpkt [FLAGS] [OPTIONS] --ip-dip <ip-dip> --ip-sip <ip-sip> --tcp-dport <tcp-dport> --tcp-sport <tcp-sport>

FLAGS:
    -h, --help            Prints help information
        --tcp-flag-ack
        --tcp-flag-cwr
        --tcp-flag-ece
        --tcp-flag-fin
        --tcp-flag-ns
        --tcp-flag-psh
        --tcp-flag-rst
        --tcp-flag-syn
        --tcp-flag-urg
    -V, --version         Prints version information
    -v, --verbose         Verbose mode (-v, -vv, -vvv, etc.)

OPTIONS:
        --ip-dip <ip-dip>
        --ip-sip <ip-sip>
        --ip-ttl <ip-ttl>
        --tcp-dport <tcp-dport>
        --tcp-seq <tcp-seq>
        --tcp-sport <tcp-sport>
        --tcp-window <tcp-window>

Install

  1. cargo install sendpkt-rs
  2. Download the binary from sendpkt-rs/releases

Requirements

You have must WinPcap or npcap installed which is libpnet required.

usage

send rst packet

sendpkt --ip-dip 127.0.0.1 --ip-sip 127.0.0.1 --tcp-dport 8888 --tcp-sport 1234  --tcp-seq 0x12345 --tcp-flag-rst

send syn packet

sendpkt --ip-dip 127.0.0.1 --ip-sip 127.0.0.1 --tcp-dport 8888 --tcp-sport 1234  --tcp-seq 0x12345 --tcp-flag-syn

License

sendpkt-rs is under the MIT license. See the LICENSE file for details.

Commit count: 16

cargo fmt