-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.cheat
19 lines (19 loc) · 1 KB
/
common.cheat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ POLICY: echo 'allow deny' | tr ' ' '\n'
$ STATUS: echo 'enable disable reset' | tr ' ' '\n'
$ SHOW_SOCKETS: echo 'listening added' | tr ' ' '\n'
$ UFW_RULES_NUMBER: sudo ufw status numbered| awk '{print $2}'|grep -o '[[:digit:]]*'
$ WAY: echo 'outgoing incoming' | tr ' ' '\n'
$ NNPORT : cat /etc/services | awk '{print $1}' | egrep -v '^#'| tr ' ' '\n'
$ NNPORT2P : cat /etc/services | awk '{print ":"$1}' | egrep -v '^:#'| tr ' ' '\n'
$ START_PORT: echo {1..65535} | tr ' ' '\n'
$ END_PORT: echo {1..65535} | tr ' ' '\n'
$ PORT: echo {1..65535} | tr ' ' '\n'
$ SD_PORT: echo 'sport dport'| tr ' ' '\n'
$ TO_PORT: echo {1..65535} | tr ' ' '\n'
$ PROTO: echo 'tcp udp' | tr ' ' '\n'
$ IPSET_TYPE: echo 'hash:ip'
$ IPSET: firewall-cmd --get-ipsets | tr ' ' '\n'
$ PROTO_LETTER: echo 't u a'| tr ' ' '\n'
$ IP_VERSION: echo '4 6' | tr ' ' '\n'
$ AT_NT: echo 'at nt' | tr ' ' '\n'
$ TCP_FILTER: echo 'established syn-sent syn-recv fin-wait-1 fin-wait-2 time-wait closed close-wait last-ack closing synchronized'| tr ' ' '\n'