Skip to content

Instantly share code, notes, and snippets.

View grizmin's full-sized avatar
🎯
Focusing

Konstantin Krastev grizmin

🎯
Focusing
View GitHub Profile
@grizmin
grizmin / windows-keys.md
Created May 23, 2024 16:58 — forked from rvrsh3ll/windows-keys.md
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@grizmin
grizmin / CloudFormation_services.json
Last active September 15, 2022 09:31
python aws_cloud_formation_services_scraper.py | jq
{
"AWS": {
"services": {
"ACMPCA": [
"Certificate",
"CertificateAuthority",
"CertificateAuthorityActivation",
"Permission"
],
"Amplify": [
@grizmin
grizmin / shelly_temp_reader.py
Last active August 3, 2022 19:01
read shelly temp sensor
import binascii
import sys
from struct import *
data = ''
if len(sys.argv) != 2:
print(f"No data. Please use {sys.argv[0]} data")
sys.exit(1)
data = sys.argv[1]
@grizmin
grizmin / powercfg-win10-more-settings.cmd
Created February 17, 2021 09:31 — forked from Nt-gm79sp/powercfg-win10-more-settings.cmd
Show/hide hidden settings in Win10 Power Options
@echo on
REM checked for Windows 10
REM fork from https://gist.github.com/theultramage/cbdfdbb733d4a5b7d2669a6255b4b94b
REM you may want full list https://gist.github.com/raspi/203aef3694e34fefebf772c78c37ec2c
REM SET attrib=+ATTRIB_HIDE
SET attrib=-ATTRIB_HIDE
REM Hard disk burst ignore time
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 %attrib%
@grizmin
grizmin / wp-admin.php
Created May 17, 2018 11:14
WordPress behind HTTPS reverse proxy
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $ips[0];
}
// If we're behind a proxy server and using HTTPS, we need to alert Wordpress of that fact
// see also http://codex.wordpress.org/Administration_Over_SSL#Using_a_Reverse_Proxy
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
@grizmin
grizmin / HomeSAN lvmcache
Created May 10, 2018 08:04
HomeSAN lvmcache
lvcreate -n cache0meta -L 128M data /dev/sde3
lvcreate -n cache0 -L 51G data /dev/sde3
lvcreate -n cache0 -L 50G data /dev/sde3
lvconvert --type cache-pool --poolmetadata data/cache0meta data/cache0
lvconvert --type cache --cachepool data/cache0 data/data
lvchange --cachemode writeback data/data
lvs -o+cache_policy,cache_settings,cache_mode
wget http://www.ahammer.ch/manuals/linux/lvm/lvmcache-statistics.sh
@grizmin
grizmin / mail inator
Created October 2, 2017 23:01
m@ilinator
0x00.name
1-8.biz
14n.co.uk
1ss.noip.me
2120001.net
3l6.com
4-n.us
4w.io
5gramos.com
80665.com
@grizmin
grizmin / netwave.py
Created July 10, 2017 20:24
netwave.py (logging)
#!/usr/bin/python
#
# by Grizmin, used spiritnull(at)sigaint.org exploit
# python3 and python2 compatible
import sys
import os
import time
import tailer
" VIRTUALENV setup
:python3 << EOF
import os
virtualenv = os.environ.get('VIRTUAL_ENV')
if virtualenv:
activate_this = os.path.join(virtualenv, 'bin', 'activate_this.py')
if os.path.exists(activate_this):
exec(compile(open(activate_this).read(), activate_this, 'exec'), {'__file__': activate_this})
EOF
@grizmin
grizmin / cratelvm.sh
Created December 5, 2016 00:25
LVM creation script
if [ ! -e /dev/disk/by-label/DATA ]; then
_disk=`fdisk -l |grep -Po '^Disk /dev/[a-z]+'|tail -1|cut -d' ' -f 2`
_disk_size=`fdisk -l |grep -P '^Disk /dev'|tail -1|cut -d' ' -f 3`
pvcreate ${_disk}
vgcreate data ${_disk}
lvcreate -n data -L$(expr $_disk_size * 80 / 100)G data
mkfs.ext4 /dev/data/data
e2label /dev/data/data DATA
else
echo "DATA already exists. Exiting."