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
AysadKozanoglu /
Created Jul 19, 2017 — forked from nepsilon/
Using auto backup with Vim — First published in issue #3

Using auto backup with Vim

Not using versioning on your configuration files and editing them with Vim? Use Vim’s backup option to automatically keep a copy of past versions:

To put in your ~/.vimrc:

"Turn on backup option
set backup
AysadKozanoglu /
Created Nov 8, 2017
3 days retain backup solutio n for remote server data
#author: Aysad Kozanoglu
# Directory in which to store the backups
AysadKozanoglu /
Last active Jul 31, 2019
rsync best fast file transfer muster (90MB/s on a 1Gbit NIC)

#auhtor: Aysad Kozanoglu

realizing a file transfer over 50MB-90MB/s on 1Gbit NIC

from remote to local

rsync -avHAXx --numeric-ids --progress -e "ssh -T -c arcfour -o Compression=no -x" user@[source]:[source_dir] [dest_dir]
View kernel_tuning_sysctl.conf
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
AysadKozanoglu / capture Passwords
Created Feb 12, 2019
get plain passwords with tcpdump
View capture Passwords

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 / nginx.conf
Last active Jul 29, 2019
fail2ban nginx 404 400 403 444 filter /etc/fail2ban/filter.d/nginx-4xx.conf
View nginx.conf
# nano /etc/fail2ban/filter.d/nginx-4xx.conf
failregex = ^<HOST>.*"(GET|POST).*" (404|444|403|400) .*$
ignoreregex =
View net_scans.txt
detail info host
nmap -A
get most ports
nmap --script smb-os-discovery
get mac adress ips hostnames
nmap -sP | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print " => "$3;}' | sort
AysadKozanoglu / sysctl.conf
Created Apr 10, 2016
high secure & perfornce debian sysctl.conf setting - debian sysctl yüksek güven ve performans ayarlari
View sysctl.conf
# Kernel sysctl configuration file for Linux
# Version 1.11 - 2015-07-07
# Aysad Kozanoglu Aysad K.
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
# Tested with: Ubuntu 14.04 LTS kernel version 3.13
AysadKozanoglu / wp.config.php
Created May 30, 2019
Disable admin-ajax on the front-end of WordPress sites and cache the resulting 404.
View wp.config.php
strpos( $_SERVER['HTTP_REFERER'], 'wp-admin' ) === false &&
strpos( $_SERVER['REQUEST_URI'], 'admin-ajax.php' ) !== false
) {
header( 'Cache-Control: max-age=30000, must-revalidate' );
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', strtotime( '+5000 minutes' ) ) . ' GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', strtotime( '-5000 minutes' ) ) . ' GMT' );
header( $_SERVER["SERVER_PROTOCOL"]." 404 Not Found" );
AysadKozanoglu /
Created May 28, 2019 — forked from fxkraus/
Install LSI MegaCli .deb package on Debian/Ubuntu




You can’t perform that action at this time.