VIM KEYBOARD SHORTCUTS
MOVEMENT
h - Move left
j - Move down
k - Move up
l - Move right
$ - Move to end of line
0 - Move to beginning of line (including whitespace)
h - Move left
j - Move down
k - Move up
l - Move right
$ - Move to end of line
0 - Move to beginning of line (including whitespace)
##TCP FLAGS## | |
Unskilled Attackers Pester Real Security Folks | |
============================================== | |
TCPDUMP FLAGS | |
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
Pester = PSH = [P] (Push Data) | |
Real = RST = [R] (Reset Connection) | |
Security = SYN = [S] (Start Connection) |
#netcat proxy to a different backed and serve requests on port80 | |
mkfifo fifo_pipe | |
nc -lk -p 80 < fifo_pipe | nc 192.168.1.10 3306 >fifo_pipe | |
#socat doing the same with connection verbosity | |
socat -d -d TCP-LISTEN:80,fork TCP:192.168.1.10:3306 |
curl -s -X GET http://localhost:8080/pdb/query/v4/facts --data-urlencode query@test --data-urlencode 'pretty=true' | |
curl -X POST http://localhost:8080/pdb/query/v4/facts \ | |
-H 'Content-Type:application/json' \ | |
-d '{"query":["and",["=","certname","FQDN"],["=","name","ipaddress"]]}' | |
content of file test : | |
["and",["=","certname","FQDN"],["or",["=","name","ipaddress"]]] |
## Add a new key to the existing configmap
$ kubectl patch cm demo-app-config --type json --patch '[{ "op": "add", "path": "/data/TEST_VALUE", "value": "test_key" }]'
configmap/demo-app-config patched
$ kubectl get cm demo-app-config -o json | jq .data.TEST_VALUE
"test_key"
#Login to openshift and retrieve token | |
curl -u admin -kv -H "X-CSRF-Token: xxx" \ | |
'https://master.cluster.local:8443/oauth/authorize?client_id=openshift-challenging-client&response_type=token' | |
#It should give you a bearer token like this | |
https://master.cluster.local:8443/oauth/token/implicit#access_token=aRVmsEHbUEhd4WeP2bctj0n57ogHMBvOIcrtjc7tCw4&expires_in=86400&scope=user%3Afull&token_type=Bearer | |
TOKEN="aRVmsEHbUEhd4WeP2bctj0n57ogHMBvOIcrtjc7tCw4" | |
#Get a configmap named configmaptest |
#!/bin/bash -x | |
#Date: 21/7/2017 | |
#Author: Mohan | |
#Purpose: To upload files to AWS S3 via Curl | |
#Uploads file at the top level folder by default | |
#S3 parameters | |
S3KEY="XXXXXXXXXXX" | |
S3SECRET="XXXXXXXXXXXXXXXX" |
oc get pod -o jsonpath='{range .items[*]}{"SPEC: \n LIMITS : "}{.spec.containers[*].resources.limits}{"\n REQUESTS: "}{.spec.containers[*].resources.requests}{"\n"}{end}'
oc get pod -o jsonpath='{range .items[*]}{"NAME: "}{.metadata.name}{"\nSPEC: \n LIMITS : "}{.spec.containers[*].resources.limits}{"\n REQUESTS: "}{.spec.containers[*].resources.requests}{"\n\n"}{end}'
#file /etc/sysconfig/slapd | |
# OpenLDAP server configuration | |
# see 'man slapd' for additional information | |
# Where the server will run (-h option) | |
# - ldapi:/// is required for on-the-fly configuration using client tools | |
# (use SASL with EXTERNAL mechanism for authentication) | |
# - default: ldapi:/// ldap:/// | |
# - example: ldapi:/// ldap://127.0.0.1/ ldap://10.0.0.1:1389/ ldaps:/// | |
SLAPD_URLS="ldap:/// ldaps:///" |