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
AysadKozanoglu / cordova-plugin-camera-index.html
Created Apr 10, 2016
Cordova Camera Plugin cordova-plugin-camera upload jquery ajax to server request
View cordova-plugin-camera-index.html
<!DOCTYPE html>
<!-- Aysad Kozanoglu -->
<html>
<head>
<title>foto cek</title>
<style>
html {
-webkit-user-select: none;
}
</style>
@AysadKozanoglu
AysadKozanoglu / nginx.conf
Last active Sep 14, 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
#
[Definition]
failregex = ^<HOST>.*"(GET|POST).*" (404|444|403|400) .*$
ignoreregex =
View token.class.php
<?
#////////////////////////////////////////////////////////////////////
#
# PHP Token based user authentication
# Token and tokenServerService Class
# based on factory design patterns
#
# written by: Aysad Kozanoglu
# email: k.a@tuta.io
# website: http://onweb.pe.hu
@AysadKozanoglu
AysadKozanoglu / RocketChat_Jira_webhook_Integration.md
Last active Sep 10, 2019
RocketChat Jira webhook Integration
View RocketChat_Jira_webhook_Integration.md

notify on issue creation, deletion and status, resolution, comment or priority changes.

  1. In Rocket.Chat go to “Administration”->”Integrations” and create “New Integration”
  2. Choose Incoming WebHook
  3. Follow all instructions like Enable, give it a name, link to channel etc. Set “Enable Script” to true and enter content of this script in the “Script” box
  4. Press Save changes and copy the Webhook URL (added just below the script box)
  5. Go to your jira as administrator and follow instructions on adding outgoing webhook here

You can tweak the content of the script to better suit your needs Add Jira integration via Outgoing WebHook

@AysadKozanoglu
AysadKozanoglu / using-auto-backup-vim.md
Created Jul 19, 2017 — forked from nepsilon/using-auto-backup-vim.md
Using auto backup with Vim — First published in fullweb.io issue #3
View using-auto-backup-vim.md

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
AysadKozanoglu / remote_backup_server_data.sh
Created Nov 8, 2017
3 days retain backup solutio n for remote server data
View remote_backup_server_data.sh
#!/bin/bash
#
#author: Aysad Kozanoglu
#
#
# Directory in which to store the backups
ROOT_DIR=/mnt/backup
REMOTE_USER=root
REMOTE_PATH=/mnt/drbd/var/mail/vmail/espresto.com
@AysadKozanoglu
AysadKozanoglu / rsync_best_fast_muster.md
Last active Jul 31, 2019
rsync best fast file transfer muster (90MB/s on a 1Gbit NIC)
View rsync_best_fast_muster.md

#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
### KERNEL TUNING ###
# 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
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

View net_scans.txt
nbtscan 192.168.1.0-192.168.1.255
detail info host
nmap -A 192.168.1.8
get most ports
nmap --script smb-os-discovery 192.168.1.8
get mac adress ips hostnames
nmap -sP 192.168.1.0/24 | awk '/Nmap scan report for/{printf $5;}/MAC Address:/{print " => "$3;}' | sort
You can’t perform that action at this time.