Skip to content

Instantly share code, notes, and snippets.

View AysadKozanoglu's full-sized avatar
💭
free 4 ever

Aysad Kozanoglu AysadKozanoglu

💭
free 4 ever
View GitHub Profile
@AysadKozanoglu
AysadKozanoglu / telegram.desktop
Created September 9, 2022 21:14
telegram app desktop config shortcut for menu entry item
### create desktop file
#### user specific shortcut ~/.local/share/applications/telegram.desktop
#### globaly for all users shortcut /usr/share/applications/telegram.desktop
```
[Desktop Entry]
Version=1.5
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
TryExec=/home/ghost/packages/Telegram/Telegram
@AysadKozanoglu
AysadKozanoglu / scp over multiple hops.md
Last active March 18, 2022 17:39
scp file over multiple hops

local copy remote file over hops with command scp

server A: 192.168.1.10 (hops over)
server B: 192.168.1.11 (remote file is here)

scp -oProxyJump=<user>@serverA <user>@<serverB>:<PATHtoFile> Downloads/

@AysadKozanoglu
AysadKozanoglu / NGINX log4J JNDI protection.md
Last active December 17, 2021 11:49
NGINX log4J JNDI protection

put in server section of your virtual Host configuration following regex

server {


if ($request_uri ~* "jndi:*|\$\{*") {
              return 403;
}
@AysadKozanoglu
AysadKozanoglu / roundcube spellcheck config pspell.md
Created September 15, 2021 09:20
roundcube spellcheck with php-pspell moudle and aspell-de aspell-en dictonary

check your php extentions for spell extension existing

php -m | grep spell

info: you have to see pspell in the output, if not than install the php extension (see notice below)

config/config.inc.php
@AysadKozanoglu
AysadKozanoglu / shell php SHA256 hash encryption.md
Last active September 14, 2021 13:14
shell php SHA256 hash encryption

sha256enc.php

<?php 

$keystr = $argv[1];

echo "\n\nplain String:\n$keystr \n\nsha256 hash:\n". hash('sha256', $keystr ) ."\n\n" ;

?&gt;
@AysadKozanoglu
AysadKozanoglu / AWS, digitalocean, scaleway all subnets blocking iptables.md
Last active September 3, 2021 11:03
AWS, digitalocean, scaleway all subnets blocking iptables

####SIBIT - systemintegration.berlin / Germany

get by known AWS ip the originAS for whole AWS network

whois 13.125.40.66 | grep "OriginAS"

you would get in the output originAS like

OriginAS: AS16509 #--> AWs ripe ORIGIN

@AysadKozanoglu
AysadKozanoglu / AES256_file_encrypter.sh
Last active November 5, 2020 14:31
AES256 bit easy encrypt decrypt file handler script , encryption based on openssl
#!/bin/bash
#####################################################
# Author: Aysad Kozanoglu
#
# OS: Debian / Ubuntu / all derivates of Debian
#
# Usage: file_encrypter.sh enc|dec FILENAME (without Ending .plain or .enc)
# example: ./file_encrypter.sh enc FILENAME
# create first NEW_FILENAME.plain with plain content
#####################################################
@AysadKozanoglu
AysadKozanoglu / mailserver_openRelay_check_telnet.sh
Last active October 27, 2020 10:53
mailserver openrelay check manuelly over telnet
```
telnet mail.MailserverDomain.com 25
#Trying 76.33.23.xxx...
#Connected to mail.MailserverDomain.com.
#Escape character is '^]'.
#220 mail.MailserverDomain.com ESMTP Postfix
helo GIVEANYEXISTINGDOMAIN.COM
@AysadKozanoglu
AysadKozanoglu / redis_server_sample.conf
Created September 19, 2020 21:34
sample redis server bind to localhost protected mode enabled
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
@AysadKozanoglu
AysadKozanoglu / nginx weak ciphers issue fix.conf
Created August 14, 2020 18:05
nginx weak ciphers issue fix
# compile nginx with openssl1.1.1
# params: --with-openssl=/source/openssl-1.1.1g --with-stream --with-threads --with-file-aio --with-http_stub_status_module --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --sbin-path=/usr/local/sbin --with-http_stub_status_module --with-http_ssl_module --user=www-data --group=www-data
# generate diffie hellman
openssl dhparam -out /etc/cert/dhparams.pem 4096
# add following params in vhost config
ssl_protocols TLSv1.2;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA HIGH !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";