Skip to content

Instantly share code, notes, and snippets.

Aysad Kozanoglu AysadKozanoglu

Block or report user

Report or block AysadKozanoglu

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
View canlitv.com_getStreamAndRestream
streamPath="/usr/local/nginx/html/stream"; link=$(wget -qO tv8.html https://canlitv.com/canli-tv8-5 | cat tv8.html | grep file | cut -d \" -f2); rm -rf $streamPath/* && ffmpeg -y -probesize 15000000 -analyzeduration 12000000 -i "$link" -user_agent "firefox browser" -strict -2 -dn -acodec copy -vcodec copy -crf 29 -hls_flags delete_segments -hls_time 10 -hls_list_size 8 -hls_segment_filename "$streamPath/tv8%d.ts" $streamPath/tv8.m3u8
View bashrc
# Shorten home dir, cygwin drives, paths that are too long
# (just bourne; no perl, sed, or bashisms!)
HOST='\033[02;36m\]\h'; HOST=' '$HOST
TIME='\033[01;31m\]\t \033[01;32m\]'
LOCATION=' \033[01;34m\]`pwd | sed "s#\(/[^/]\{1,\}/[^/]\{1,\}/[^/]\{1,\}/\).*\(/[^/]\{1,\}/[^/]\{1,\}\)/\{0,1\}#\1_\2#g"`'
BRANCH=' \033[00;33m\]$(git_branch)\[\033[00m\]\n\$ '
PS1=$TIME$USER$HOST$LOCATION$BRANCH
PS2='\[\033[01;36m\]>'
@AysadKozanoglu
AysadKozanoglu / capture Passwords tcpdump.md
Created Feb 12, 2019
get plain passwords with tcpdump
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

@AysadKozanoglu
AysadKozanoglu / install openvpn 2.4 ubuntu 16.04 and debian Jessie.sh
Last active Jan 22, 2019
install openvpn 2.4 ubuntu 16.04 and debian jessie
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
@AysadKozanoglu
AysadKozanoglu / vimrc-config
Created Dec 20, 2018
my ultimate vim config
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
@AysadKozanoglu
AysadKozanoglu / set-locale_en_US.UTF-8.sh
Last active Dec 14, 2018
set locale en_US.UTF-8 quick script
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
@AysadKozanoglu
AysadKozanoglu / simple_chat_network.sh
Created Nov 27, 2018
simple chat on network (do not use it on public net )
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
You can’t perform that action at this time.