Skip to content

Instantly share code, notes, and snippets.

View aizuddin85's full-sized avatar
🎯
Focusing

Aizuddin Zali aizuddin85

🎯
Focusing
View GitHub Profile
#!/usr/bin/python
load = open("/proc/loadavg",'r')
read = load.read(4)
int = str(read)
print int
#print read
if int > "2.00":
print "Load is high"
#!/usr/bin/python
import re
file = open("/var/log/messages", 'r')
for i in file.readlines():
if re.search('Python', i):
print i
file.close()
@aizuddin85
aizuddin85 / OracleWrapper.py
Created September 26, 2015 18:19 — forked from cemremengu/OracleWrapper.py
cx_Oracle Wrapper
import cx_Oracle
class OracleWrapper(object):
"""
A class for handling db operations
"""
def __init__(self, constring):
self.constring = constring.strip()
self.db_connection = cx_Oracle.connect(constring)
@aizuddin85
aizuddin85 / complex_ldap_query.py
Created September 21, 2016 06:39 — forked from futureimperfect/complex_ldap_query.py
Complex LDAP Queries with python-ldap
import ldap
import sys
LDAP_URI = 'ldap://ldap.example.com'
SEARCH_BASE = 'ou=Example,dc=example,dc=com'
QUERY = '(&(nickname=M*)(employeeType=fulltime)(|(!(departmentNumber=5*))(loginShell=/bin/bash)))'
def ldap_search(ldap_uri, base, query):
'''
@aizuddin85
aizuddin85 / gist:a33bccc4824f0f4c006b4d05e5370a30
Created September 15, 2017 07:16
Proof Of Concept: Openstack on Libvirt
# Hardware
@aizuddin85
aizuddin85 / gce_messages.log
Last active September 29, 2017 15:33
gce_openshift_origin_IP_conflict
This file has been truncated, but you can view the full file.
Sep 29 15:13:44 master systemd: Created slice User Slice of root.
Sep 29 15:13:44 master systemd: Starting User Slice of root.
Sep 29 15:13:44 master systemd: Started Session 12 of user root.
Sep 29 15:13:44 master systemd-logind: New session 12 of user root.
Sep 29 15:13:44 master systemd: Starting Session 12 of user root.
Sep 29 15:13:44 master ansible-setup: Invoked with filter=* gather_subset=['all'] fact_path=/etc/ansible/facts.d gather_timeout=10
Sep 29 15:13:46 master ansible-setup: Invoked with filter=* gather_subset=['all'] fact_path=/etc/ansible/facts.d gather_timeout=10
Sep 29 15:13:48 master ansible-stat: Invoked with checksum_algorithm=sha1 get_checksum=True follow=False path=/run/ostree-booted get_md5=True get_mime=True get_attributes=True
Sep 29 15:13:49 master ansible-yum: Invoked with name=['iproute'] list=None install_repoquery=True conf_file=None disable_gpg_check=False state=present disablerepo=None update_cache=False enablerepo=None exclude=None validate_certs=True installroot=/ skip_brok
@aizuddin85
aizuddin85 / gist:00ad76a992854ff8022636c61d8fd127
Created February 22, 2018 13:44
OpenShift 3.7 atomic with glusterfs.
This guide satisfied below RHEL environment:
Bastion node.
a. jump.example.com - RHEL 7.4, ansible-host
OCP Node list.
a. ocp-master01.example.com - atomic
b. ocp-node01.example.com - atomic
c. ocp-node02.example.com - atomic
@aizuddin85
aizuddin85 / tcp_flags.txt
Created May 28, 2018 13:45 — forked from tuxfight3r/tcp_flags.txt
tcpdump - reading tcp flags
##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)
1. Create DR project.
2. Patch namespace to use same SELinux, supplementalID and GroupID as production project. (oc describe project <namespace>)
[root@ocpmaster01 ~]# oc patch namespace eapapp-dr -p "{\"metadata\":{\"annotations\":{\"openshift.io/sa.scc.uid-range\":\"1000140000/10000\"}}}"
namespace "eapapp-dr" patched
[root@ocpmaster01 ~]# oc patch namespace eapapp-dr -p "{\"metadata\":{\"annotations\":{\"openshift.io/sa.scc.supplemental-groups\":\"1000140000/10000\"}}}"
namespace "eapapp-dr" patched
[root@ocpmaster01 ~]# oc patch namespace eapapp-dr -p "{\"metadata\":{\"annotations\":{\"openshift.io/sa.scc.mcs\":\"s0:c12,c4\"}}}"
namespace "eapapp-dr" patched
During VA scan, some cipher considered as not safe and need to be disabled. This easily can be done by configuring /etc/origin/master/master-config.yaml.
servingInfo:
...
minTLSVersion: VersionTLS12
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_RSA_WITH_AES_256_CBC_SHA
- TLS_RSA_WITH_AES_128_CBC_SHA