Skip to content

Instantly share code, notes, and snippets.

Mohan Balasundaram tuxfight3r

Block or report user

Report or block tuxfight3r

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tuxfight3r / tcp_flags.txt
Last active Nov 13, 2019
tcpdump - reading tcp flags
View tcp_flags.txt
Unskilled Attackers Pester Real Security Folks
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)
tuxfight3r /
Last active Nov 9, 2019
python tcp socket client / server examples
import socket #for sockets
import sys #for exit
#create an AF_INET, STREAM socket (TCP)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error, msg:
print 'Failed to create socket. Error code: ' + str(msg[0]) + ' , Error message : ' + msg[1]
tuxfight3r / openshift_cli_tricks.MD
Last active Nov 3, 2019
openshift cli tricks - using go templates
View openshift_cli_tricks.MD

openshift list all pods and thier specs (requests/limits)

oc get pod -o jsonpath='{range .items[*]}{"SPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n"}{end}'

openshift list all pods and thier specs with name (requests /limits)

oc get pod -o jsonpath='{range .items[*]}{"NAME:  "}{}{"\nSPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n\n"}{end}'
tuxfight3r /
Last active Oct 31, 2019
Bash keyboard shortcuts



command description
ctrl + a Goto BEGINNING of command line
ctrl + e Goto END of command line
ctrl + b move back one character
tuxfight3r / jenkins-decrypt.groovy
Created Sep 23, 2015
Decrypting Jenkins Password
View jenkins-decrypt.groovy
#To Decrypt Jenkins Password from credentials.xml
#go to the jenkins url
#In the console paste the script
tuxfight3r / ipxe_with_dhcp.txt
Last active Oct 25, 2019
ipxe kickstart over http - dhcp and static configuration
View ipxe_with_dhcp.txt
#clone the repo
git clone
cd ipxe/src
cat >ubuntu-amd64-installer.ipxe <<EOF
echo Starting Ubuntu x64 installer for ${hostname}
set base-url
kernel ${base-url}/linux
tuxfight3r / slapd
Last active Oct 23, 2019
openldap proxy to AD with TLS
View slapd
#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:// ldap:// ldaps:///
SLAPD_URLS="ldap:/// ldaps:///"
View format.json.bookmarklet.js
javascript:!function(){var n,e,r,i;n=window,e=document.body,r=JSON.parse,i=JSON.stringify,n.isf||(e.innerHTML="<pre>"+i(r(e.innerText),null,4).replace(/\"(.*)[^\:]\:/g,'<span style="color:#9C3636">$1&colon;</span>')+"</pre>",n.isf=!0)}();
//save as bookmark and click it whenever you open a json response in a browser tab/window

curl connect to https domain using ip

curl --resolve --cacert adcacrt.crt -v

curl use proxy

# http proxy
curl -v -x -L
tuxfight3r / ssh-keygen
Last active Sep 25, 2019
ssh key / fingerprint tricks
View ssh-keygen
#Read multiple keys from an authorized_keys file and print the finger print
[root@server01 .ssh]# while read line; do ssh-keygen -l -f /dev/stdin <<< $line; done < authorized_keys
2048 87:7a:4d:70:d2:10:a4:4b:b7:e1:2b:7c:77:92:25:04 /dev/stdin (RSA)
2048 7d:f0:89:94:00:09:bc:70:46:59:8d:9a:70:3b:ac:70 /dev/stdin (RSA)
2048 61:63:ee:0d:f6:d2:d8:d6:ae:37:0c:35:ae:da:51:6a /dev/stdin (RSA)
#read a key from authorized key file
[root@server01 .ssh]# ssh-keygen -l -f authorized_keys
2048 87:7a:4d:70:d2:10:a4:4b:b7:e1:2b:7c:77:92:25:04 authorized_keys (RSA)
You can’t perform that action at this time.