Skip to content

Instantly share code, notes, and snippets.

@dafanasiev
dafanasiev / HOWTO.sh
Created April 9, 2020 12:21
nginx-time_wait
1) start run.sh
2) make query: curl -v http://localhost:5000/
3) check TIME_WAIT: netstat -ano4 |grep 500[01]
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 0.0.0.0:5001 0.0.0.0:* LISTEN off (0.00/0/0)
!!! ====> tcp 0 0 127.0.0.1:47342 127.0.0.1:5000 TIME_WAIT timewait (57,10/0/0)
tcp 0 0 127.0.0.1:5001 127.0.0.1:47366 ESTABLISHED off (0.00/0/0)
tcp 0 0 127.0.0.1:47366 127.0.0.1:5001 ESTABLISHED off (0.00/0/0)
#!/bin/bash
TMP_FILE=$(mktemp -u).png
gnome-screenshot -a -f ${TMP_FILE}
xclip -selection clip -t image/png ${TMP_FILE}
rm -f ${TMP_FILE}
234
#include "assert.h"
#include <string>
#include <iomanip>
#include <iostream>
#include <vector>
#include <openssl/evp.h>
#include <openssl/ecdh.h>
#include <openssl/aes.h>
#include <openssl/sha.h>