Inspiration: Linux and Unix nc command
Example protobuf definition:
message Person {
required string name = 1;
required int32 id = 2;| // +build ignore | |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "runtime" | |
| "syscall" | |
| ) |
Inspiration: Linux and Unix nc command
Example protobuf definition:
message Person {
required string name = 1;
required int32 id = 2;| Detecting and Mitigating DDOS Attacks | |
| #List all Finish (FIN) packets | |
| machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 1 != 0' | |
| #List all SYN and SYN-ACK packets | |
| machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 2 != 0' | |
# deploy (example)
rpm -iv pkg-{version}-x86_64.rpm
# list current version
rpm -qi pkg
# uninstall
rpm -ev pkg| # osx | |
| cat test.http | nc -l -p 8000 | |
| # linux | |
| cat test.http | nc -l 8000 | |
| # centos fix | |
| # http://serverfault.com/a/729768/71640 | |
| # Removes the old package | |
| yum erase nc |
| # https://www.percona.com/blog/2008/11/07/poor-mans-query-logging/ | |
| tcpdump -i eth0 -s 0 -l -w - dst port 3306 | strings | perl -e ' | |
| while(<>) { chomp; next if /^[^ ]+[ ]*$/; | |
| if(/^(SELECT|UPDATE|DELETE|INSERT|SET|COMMIT|ROLLBACK|CREATE|DROP|ALTER)/i) { | |
| if (defined $q) { print "$q\n"; } | |
| $q=$_; | |
| } else { | |
| $_ =~ s/^[ \t]+//; $q.=" $_"; | |
| } |
| # osx | |
| lsof -iTCP -sTCP:LISTEN | |
| # linux: tuna please! | |
| netstat -tunapl |
| nc -l 2000 -k -c 'xargs -n 2 echo' |