<commit_before># gomphs

Simple tool to ping multiple hosts at once with an overview

## usage 
Needs to be run as root (raw sockets for icmp)  
When using hostnames with ipv4 and ipv6 addresses, preference goes to ipv4.

```
# gomphs
usage:
  -hosts="": ip addresses/hosts to ping, space seperated (e.g "8.8.8.8 8.8.4.4 google.com fc00:db20:35b:7399::5")
  -showrtt=false: show roundtrip time in ms
```

```
. host is up
! host is down
```

* With showrtt enabled 

When rtt > 1s it will just show ">1s"  
When rtt < 0ms it will just show 0  

After 20 pings the header will be repeated

## example

```
# gomphs -hosts "8.8.8.8 192.168.1.1 8.8.4.4 fc00:db20:35b:7399::5 facebook.com" -showrtt
	|   1 |   2 |   3 |   4 |   5 |
0000|  12 |   ! |  14 |  39 | 110 |
0001|  13 |   ! |  12 |  39 | 110 |
0002|  11 |   ! |  11 |  40 | 108 |
0003|  13 |   ! |  11 |  37 | 110 |
0004|  12 |   ! |  12 |  39 | 109 |
0005|  12 |   ! |  13 |  38 | 109 |

# gomphs -hosts "8.8.8.8 192.168.1.1 8.8.4.4 fc00:db20:35b:7399::56 facebook.com"
    | 1 | 2 | 3 | 4 | 5 |
0000| . | ! | . | . | . |
0001| . | ! | . | . | . |
0002| . | ! | . | . | . |
0003| . | ! | . | . | . |
0004| . | ! | . | . | . |
0005| . | ! | . | . | . |
```<commit_msg>Add expand switch documentation<commit_after># gomphs

Simple tool to ping multiple hosts at once with an overview

## usage 
Needs to be run as root (raw sockets for icmp)  
When using hostnames with ipv4 and ipv6 addresses, preference goes to ipv4.

```
# gomphs
usage:
  -expand=false: use all available ip's (ipv4/ipv6) of a hostname (multiple A, AAAA).
  -hosts="": ip addresses/hosts to ping, space seperated (e.g "8.8.8.8 8.8.4.4 google.com fc00:db20:35b:7399::5")
  -showrtt=false: show roundtrip time in ms
```

```
. host is up
! host is down
```

* With showrtt enabled 

When rtt > 1s it will just show ">1s"  
When rtt < 0ms it will just show 0  

After 25 pings the header will be repeated

* With expand enabled

When using expand this also prints an extra (onetime) header so you know what ip addresses belong to what number.
See examples

## example

```
# gomphs -hosts "8.8.8.8 192.168.1.1 8.8.4.4 fc00:db20:35b:7399::5 facebook.com" -showrtt
	#   1 #   2 #   3 #   4 #   5 #
0000|  12 |   ! |  14 |  39 | 110 |
0001|  13 |   ! |  12 |  39 | 110 |
0002|  11 |   ! |  11 |  40 | 108 |
0003|  13 |   ! |  11 |  37 | 110 |
0004|  12 |   ! |  12 |  39 | 109 |
0005|  12 |   ! |  13 |  38 | 109 |

# gomphs -hosts "8.8.8.8 192.168.1.1 8.8.4.4 fc00:db20:35b:7399::5 facebook.com"
    # 1 # 2 # 3 # 4 # 5 #
0000| . | ! | . | . | . |
0001| . | ! | . | . | . |
0002| . | ! | . | . | . |
0003| . | ! | . | . | . |
0004| . | ! | . | . | . |
0005| . | ! | . | . | . |
```

* Using expand
Facebook resolves into 2 addresses (ipv4/ipv6), see 5 and 6 in example.  
When using expand this also prints an extra (onetime) header so you know what ip addresses belong to what number

```
# gomphs -hosts "8.8.8.8 192.168.1.1 8.8.4.4 fc00:db20:35b:7399::5 facebook.com" -showrtt -expand
1=8.8.8.8
2=192.168.1.1
3=8.8.4.4
4=2a00:fdf8:f53e:61e4::18
5=2a03:2880:2130:cf05:face:b00c:0:1
6=192.168.3.11
    #   1 #   2 #   3 #   4 #   5 #   6 #
0000|  12 |   ! |  12 |  40 | 129 | 131 |
0001|  13 |   ! |  15 |  40 | 129 | 135 |
0002|  14 |   ! |  14 |  41 | 128 | 134 |
0003|  14 |   ! |  14 |  41 | 130 | 134 |
0004|  16 |   ! |  24 |  43 | 128 | 134 |
0005|  13 |   ! |  12 |  39 | 126 | 132 |
0006|  14 |   ! |  14 |  40 | 128 | 132 |
0007|  15 |   ! |  14 |  41 | 126 | 134 |
0008|  11 |   ! |  13 |  39 | 128 | 134 |

# gomphs -hosts "8.8.8.8 192.168.1.1 8.8.4.4 fc00:db20:35b:7399::5 facebook.com" -expand
1=8.8.8.8
2=192.168.1.1
3=8.8.4.4
4=2a00:fdf8:f53e:61e4::18
5=2a03:2880:2130:cf05:face:b00c:0:1
6=192.168.3.11
    # 1 # 2 # 3 # 4 # 5 # 6 #
0000| . | ! | . | . | . | . |
0001| . | ! | . | . | . | . |
0002| . | ! | . | . | . | . |
0003| . | ! | . | . | . | . |
0004| . | ! | . | . | . | . |
0005| . | ! | . | . | . | . |
0006| . | ! | . | . | . | . |
```
{'fraction_non_alphanumeric': 0.1905120481927711, 'fraction_numerical': 0.18875502008032127, 'mean_word_length': 2.0419847328244276, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 30, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1385617', 'n_tokens_mistral': 2252, 'n_tokens_neox': 1789, 'n_words': 478}