How to: Replay session
scriptreplay --timing=session.time session.log
```

___

##### Tool: [du](https://en.wikipedia.org/wiki/GNU_Screen)

###### Show 20 biggest directories with 'K M G'

```bash
du | \
sort -r -n | \
awk '{split("K M G",v); s=1; while($1>1024){$1/=1024; s++} print int($1)" "v[s]"\t"$2}' | \
head -n 20
```

___

##### Tool: [inotifywait](https://en.wikipedia.org/wiki/GNU_Screen)

###### Init tool everytime a file in a directory is modified

```bash
while true ; do inotifywait -r -e MODIFY dir/ && ls dir/ ; done;
```

___

##### Tool: [openssl](https://www.openssl.org/)

###### Testing connection to the remote host

```bash
echo | openssl s_client -connect google.com:443 -showcerts
```

###### Testing connection to the remote host (debug mode)

```bash
echo | openssl s_client -connect google.com:443 -showcerts -tlsextdebug -status
```

###### Testing connection to the remote host (with SNI support)

```bash
echo | openssl s_client -showcerts -servername google.com -connect google.com:443
```

###### Testing connection to the remote host with specific ssl version

```bash
openssl s_client -tls1_2 -connect google.com:443
```

###### Testing connection to the remote host with specific ssl cipher

```bash
openssl s_client -cipher 'AES128-SHA' -connect google.com:443
```

###### Verify 0-RTT

```bash
_host="example.com"

cat > req.in << __EOF__
HEAD / HTTP/1.1
Host: $_host
Connection: close
__EOF__

openssl s_client -connect ${_host}:443 -tls1_3 -sess_out session.pem -ign_eof < req.in
openssl s_client -connect ${_host}:443 -tls1_3 -sess_in session.pem -early_data req.in
```

###### Generate private key without passphrase

```bash