summaryrefslogtreecommitdiffstats
path: root/nping/nping-dev/NpingExamples.txt
blob: 055db5d923ce7ad32c811eb91b5434d24be8b6e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
++++++++++++++++++++++++++
|  NPING USAGE EXAMPLES  |
++++++++++++++++++++++++++


# These can be run with no privileges ******************************************

/* Do simple TCP connect()s to one host */
nping --tcp-connect google.com

/* Do simple TCP connect()s to multiple hosts */
nping --tcp-connect google.com ask.com yahoo.com bing.com

/* Send an UDP packet with 100 bytes of random data */
nping --udp google.com -p 53 --data-length 100

/* Try to TCP connect() to a range of ports */
nping --tcp-connect google.com -p75-85 -c 1

# These require root access ****************************************************

# Send TCP Syn with the ECN flag also set
sudo nping --tcp google.com --flags syn,ecn -p80,443

# Send UDP packet with a bogus checksum from port 1337
sudo nping --udp --badsum --source-port 1337 -p 53 google.com -v6

# Send ARP requests to 192.168.1.1
sudo nping --arp 192.168.1.1

# Send ARP requests to all host in network 192.168.1.0 (inter-probe delay = 100ms)
sudo nping --arp 192.168.1.0/24 --delay 100

# Send 300 TCP packets at a rate of 100pkts/sec
sudo nping --tcp google.com --rate 100 -c 300

# Send ICMP echo request wit custom ID and Seq fields
sudo nping google.com --icmp --icmp-type echo --icmp-id 31337 --icmp-seq 1

# Send ICMP echo reply
sudo nping google.com --icmp --icmp-type echo-reply

# Send ICMP Parameter problem with custom pointer
sudo nping google.com --icmp --icmp-type parameter-problem --icmp-param-pointer 9

# Send ICMP Source Quench
sudo nping google.com --icmp --icmp-type source-quench -v6

# Send ICMP Time Exceeded because time exceeded during reassembly
sudo nping google.com --icmp --icmp-type te --icmp-code frag-exc -v5

# Send ICMP Router Advertising with 2 entries
sudo nping google.com --icmp --icmp-type 9 --icmp-advert-entry 1.1.1.1,300 --icmp-advert-entry 33.33.33.33,12345 -v6