Instantly share code, notes, and snippets.

Aysad Kozanoglu AysadKozanoglu

View GitHub Profile
View capture Passwords tcpdump.md

Capture SMTP Email

tcpdump -nn -l port 25 | grep -i 'MAIL FROM\|RCPT TO'

Extract HTTP Passwords in POST Requests

tcpdump -s 0 -A -n -l | egrep -i "POST /|pwd=|passwd=|password=|Host:"

Capture FTP Credentials and Commands

View install openvpn 2.4 ubuntu 16.04 and debian Jessie.sh
curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add
# ubuntu 16.04
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
#debian jessie
echo "deb http://build.openvpn.net/debian/openvpn/stable jessie main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
apt update
apt install -y openvpn
View vim nginx icinga2 syntax highlight
#!/bin/bash
# author: Aysad Kozanoglu
# Highligh Nginx config file in Vim
# NGINX
# Download syntax highlight
mkdir -p ~/.vim/syntax/
wget https://git.io/fhJsu -O ~/.vim/syntax/nginx.vim
# Set location of Nginx config file
View vimrc-config
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Features {{{1
"
" These options and commands enable some very useful features in Vim, that
" no user should have to live without.
View shellScript_yes_no_prompt_for_reboot.sh
#!/bin/sh
# Author: Aysad Kozanoglu
# quick launch script:
#
# wget -qO reboot.sh https://git.io/fpNpo && chmod a+x reboot.sh ; sh reboot.sh
while true; do
read -p "Do you wish to reboot server?" yn
case $yn in
[Yy]* ) echo "OK, server will boot in 5 sec..."; sleep 4; shutdown -r now; break;;
View nginx_serviceCheck.sh
#!/bin/sh
# Author: Aysad Kozanoglu
SERVICE='nginx'
DATE=$(date '+%Y-%m-%d %H:%M:%S')
NGINXBIN=$(which nginx)
LOGTO=/var/log/serviceChecker.log
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
View set-locale_en_US.UTF-8.sh
#! /bin/sh
# author: Aysad kozanoglu
#
# quick launch script:
#
# wget -O - https://git.io/fpbwk | sh
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
View simple_chat_network.sh
# replace 192.168.x.x with your ip
# apt install mawk
# the server
mawk -W interactive '$0="Aysad: "$0' | nc -l -p 9000 192.168.x.x
# the clients
mawk -W interactive '$0="clientUser1: "$0' | nc 192.168.x.x 9000
View dialog_percentage.sh
# apt install dialog
echo 40 | dialog --title " PANEL installer" --gauge "installing needed packages - please wait..." 8 50
View Quick_autoInstaller_scripts.txt
# Author: Aysad Kozanoglu
# Email: aysadx@gmail.com
one liner auto installer scripts for debian Jessie (jessie LTS until 2020) (and derivates like ubuntu)
MariaDB singler Server installation
# source: https://gist.github.com/AysadKozanoglu/d485de4d7b6492cb0c478c098b4c63c6#file-mariadb_debian_jessie_install-sh
wget -O - https://git.io/fpuj6 | bash
nginx threads,iao, stream, ssl compile installation