Skip to content

Instantly share code, notes, and snippets.

View sgnn7's full-sized avatar
🤔
ǝʌᴉʇɔǝdsɹǝd ɹnoʎ ǝƃuɐɥƆ

Srdjan Grubor sgnn7

🤔
ǝʌᴉʇɔǝdsɹǝd ɹnoʎ ǝƃuɐɥƆ
View GitHub Profile
@sgnn7
sgnn7 / update_bash.sh
Last active August 29, 2015 14:06
Update bash to non-buggy version
#!/bin/bash -e
VERSION=4.3-7ubuntu1.3
BUILD=6410174
PPA="ubuntu-security-proposed"
ARCH=amd64
PREFIX=/tmp/dl
sudo rm -rf $PREFIX
mkdir -p $PREFIX
@sgnn7
sgnn7 / nginx.conf
Last active September 12, 2023 02:33
NGINX caching
# vim:ff=unix:ts=2:sw=2:ai:expandtab
# Cache location setup - this should be the NAS
proxy_cache_path /var/cache/nginx
levels=1:2
keys_zone=bundle-cache:8M
max_size=100000M
inactive=3M
loader_threshold=330
loader_files=1000;
@sgnn7
sgnn7 / nginx.conf
Last active August 29, 2015 14:08
NGINX SSL ciphers
{
# Less secure though more compatible and possibly vulnerable to BEAST attack
# ssl_ciphers 'EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:DHE+aRSA+AES:EECDH+aRSA+SHA384:EECDH+aRSA+GCM+SHA256:!aNULL:!eNULL:!EXPORT:!MEDIUM:!LOW:!CAMELLIA:!3DES:!DES:!MD5:!PSK:!RC4:!DSS:!SRP:!DSS:!SEED:!SSLv3:!SSLv2:!IDEA:!aGOST';
# More secure but might not be compatible with all browsers
ssl_ciphers 'EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EDH+aRSA+AESGCM:!SHA:!aNULL:!eNULL:!EXPORT:!MEDIUM:!LOW:!CAMELLIA:!3DES:!DES:!MD5:!PSK:!RC4:!DSS:!SRP:!DSS:!SEED:!SSLv3:!SSLv2:!IDEA:!aGOST';
ssl_ecdh_curve secp384r1;
}
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(128) Mac=AEAD
@sgnn7
sgnn7 / type7decrypter.py
Last active June 1, 2016 14:09
Cisco Type7 Password Decrypter
#!/usr/bin/python3 -u
class Type7Decrypter(object):
# Author: Srdjan Grubor
# License: Apache-2.0
MAGIC_VALUES = (0x64, 0x73, 0x66, 0x64, 0x3b, 0x6b, 0x66, 0x6f, 0x41, 0x2c, 0x2e,
0x69, 0x79, 0x65, 0x77, 0x72, 0x6b, 0x6c, 0x64, 0x4a, 0x4b, 0x44,
0x48, 0x53, 0x55, 0x42, 0x73, 0x67, 0x76, 0x63, 0x61, 0x36, 0x39,
0x38, 0x33, 0x34, 0x6e, 0x63, 0x78, 0x76, 0x39, 0x38, 0x37, 0x33,
#!/usr/bin/env python3
import sys
import re
import gi.repository
from gi.repository import Gio, GLib
MAIN_DEST = 'com.endlessm.AppManager'
MAIN_PATH = '/com/endlessm/AppManager'
app store
-> com.endlessm.AppManager.Install(appid)
-> com.endlessm.AppManager.Update(appid, allow_deltas)
app manager
| build com.endlessm.AppManager.Transaction object
<- transaction path
app store
| get com.endlessm.AppManager.Transaction properties
@sgnn7
sgnn7 / gist:0d932ee9e1568a0815cd
Last active October 7, 2020 15:37
App store run
make && sudo make install && sleep 1 && ps -ef | grep app-store | grep gjs | awk '{print $2}' | xargs kill
ps -ef | grep app-store | grep gjs | awk '{print $2}' | xargs kill
make && sudo make install && ( sudo killall eam || true ) && sleep 1 && ~/foo.py refresh
GJS_PATH=. nohup gnome-shell --replace &
journalctl -f --full -a | grep -v Xorg | grep -v DHCPREQUEST &
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
@sgnn7
sgnn7 / gist:776bbc949d2e076fcf81
Last active October 7, 2020 15:38
linkedin.com connection
openssl s_client -host linkedin.com -port 443
CONNECTED(00000003)
depth=0 C = US, ST = California, L = Mountain View, O = LinkedIn Corporation, CN = www.linkedin.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = US, ST = California, L = Mountain View, O = LinkedIn Corporation, CN = www.linkedin.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 C = US, ST = California, L = Mountain View, O = LinkedIn Corporation, CN = www.linkedin.com
X.Org X Server 1.17.1
Release Date: 2015-02-10
[ 66.151] X Protocol Version 11, Revision 0
[ 66.151] Build Operating System: Linux 3.2.0-4-686-pae i686 Endless
[ 66.152] Current Operating System: Linux endless 4.1.0-1-generic #1+dev42.7fa5ee1bem1-Endless SMP Tue Jul 14 14:56:30 UTC 2015 i686
[ 66.152] Kernel command line: BOOT_IMAGE=/vmlinuz-4.1.0-1-generic root=UUID=ba60118b-1114-43eb-a354-1f88380ceb55 ro root=LABEL=ostree rw splash plymouth.ignore-serial-consoles quiet
[ 66.153] Build Date: 15 June 2015 07:38:40PM
[ 66.154] xorg-server 2:1.17.1-0ubuntu3endless7bem1 (For technical support please see http://www.ubuntu.com/support)
[ 66.154] Current version of pixman: 0.32.6
[ 66.155] Before reporting problems, check http://wiki.x.org