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 / jira.service
Created March 27, 2023 14:54
jira service systemd config
# info:
# create new service config file
# touch /lib/systemd/system/jira.service
# chmod 664 /lib/systemd/system/jira.service
#
# jira.service config
[Unit]
Description=Atlassian Jira
After=network.target
@AysadKozanoglu
AysadKozanoglu / data.json
Last active November 2, 2022 12:01
shuffle json object
// Author: Aysad Kozanoglu
externData = [
{
"name": "cola",
"epreis": "1.50"
},
{
@AysadKozanoglu
AysadKozanoglu / nginx_log4j_protection.conf
Created November 1, 2022 23:11
nginx lua scripting against log4j protection
# LUA block to detect, block and log Log4Shell attacks (C) Infiniroot 2021 (@infiniroot)
# with lua fixes and other enhancements from Andreas Nanko (@andreasnanko)
rewrite_by_lua_block {
function decipher(v)
local s = tostring(v)
s=ngx.unescape_uri(s)
if string.find(s, "${base64:") then
t=(string.gsub(s, "${${base64:([%d%a%=]+)}}", "%1"))
s=string.gsub(s, "${base64:([%d%a%=]+)}", tostring(ngx.decode_base64(t)))
end
@AysadKozanoglu
AysadKozanoglu / achme.sh-standalone-script.sh
Created September 24, 2022 14:10
acme.sh script handling for standalone mode
in this script webserver is nginx, so pre handling is only for nginx but you can change it to your needs and webserver
```
ACMEDOMAIN=domainname.tld
/root/.acme.sh/acme.sh --standalone --issue -d www.${ACMEDOMAIN} -d ${ACMEDOMAIN} \
--cert-file /etc/ssl/${ACMEDOMAIN}-cert.pem \
--key-file /etc/ssl/${ACMEDOMAIN}-priv.pem \
--fullchain-file /etc/ssl/${ACMEDOMAIN}-fullchain.pem \
--pre-hook "nginx -s stop; killall nginx" \
--post-hook "nginx"
@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 / sysctl.conf
Created April 10, 2016 22:42
high secure & perfornce debian sysctl.conf setting - debian sysctl yüksek güven ve performans ayarlari
# 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
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;