Skip to content

Instantly share code, notes, and snippets.

View guillaumef's full-sized avatar

Guillaume F guillaumef

View GitHub Profile
@guillaumef
guillaumef / redis-accept-private-network-only.patch
Created June 10, 2021 14:15
redis - accept only private network ips connections.
--- redis/src/anet.c 2021-06-01 16:03:36.000000000 +0200
+++ redis.mod/src/anet.c 2021-06-10 15:32:14.280101531 +0200
@@ -519,6 +519,43 @@ int anetTcpAccept(char *err, int s, char
struct sockaddr_in *s = (struct sockaddr_in *)&sa;
if (ip) inet_ntop(AF_INET,(void*)&(s->sin_addr),ip,ip_len);
if (port) *port = ntohs(s->sin_port);
+ /* EULERIAN */
+ {
+ struct sockaddr_storage sa;
+ socklen_t salen = sizeof(sa);
<?php
# PHP - low level AES 256 crypt/decrypt using openssl
# compatible with 'openssl enc' format
#
# Key: 32
# IV : 16
#
# Padding: PKCS7 (operated by openssl)
# EVP_BytesToKey: SHA256
@guillaumef
guillaumef / aes256-compat-openssl-enc-dec.js
Created January 16, 2018 16:57
JS - AES 256 crypt/decrypt compatible with 'openssl enc' format - depends on sjcl for SHA256 Raw
/*
* AES 256 crypt/decrypt compatible with 'openssl enc' format
* Depends on sjcl for SHA256: https://bitwiseshiftleft.github.io/sjcl/
*
* Usage:
<script type="text/javascript" src="sjcl.js"></script>
<script type="text/javascript" src="this_file.js"></script>
*
* Author: Zorro Aka Diego de la Vega
*
@guillaumef
guillaumef / aes256-compat-openssl-enc-dec.py
Last active April 11, 2023 03:19
Python - AES 256 crypt/decrypt compatible with 'openssl enc' format
#!python
"""OpenSSL enc compatible script by Python.
"""
""" Based on:
https://gist.github.com/chrono-meter/d122cbefc6f6248a0af554995f072460
Added: base64
Need: python3-crypto
# Encrypt
python3 ./aes256-compat-openssl-enc-dec.py -in <filein> -e -salt -aes-256-cbc
@guillaumef
guillaumef / aes256-compat-openssl-enc-dec.pl
Created January 14, 2018 13:06
Perl - low level AES 256 crypt/decrypt using Crypt::Rijndael compatible with 'openssl enc' format
#!/usr/bin/perl
#
# Perl - low level AES 256 crypt/decrypt using Crypt::Rijndael
# compatible with 'openssl enc' format
#
# Key: 32
# IV : 16
#
# Padding: PKCS7
# EVP_BytesToKey: SHA256
@guillaumef
guillaumef / v1-2L-gh60-satan-revchn-hhkb-fullmode-BS-3layers-exactkeys.kbd.json
Last active February 8, 2017 21:34
v1-2L-gh60-satan-revchn-hhkb-fullmode-BS-3layers-exactkeys
[
[
"Esc",
"!\n1",
"@\n2",
"#\n3",
"$\n4",
"%\n5",
"^\n6",
"&\n7",
@guillaumef
guillaumef / v1-2L-gh60-satan-revchn-hhkb-fullmode-BS-3layers.kbd.json
Last active January 11, 2017 21:23
v1-2L-gh60-satan-revchn-hhkb-fullmode-BS-3layers
[
[
"Esc",
"!\n1",
"@\n2",
"#\n3",
"$\n4",
"%\n5",
"^\n6",
"&\n7",
[
[
"Esc",
"!\n1",
"@\n2",
"#\n3",
"$\n4",
"%\n5",
"^\n6",
"&\n7",
@guillaumef
guillaumef / v1-2L-gh60-satan-revchn-hhkb-fullmode.kbd.json
Last active January 9, 2017 01:23
v1-2L-gh60-satan-revchn-hhkb-fullmode
[
{
"switchMount": "cherry",
"switchBrand": "gateron",
"switchType": "KS-3-Tea",
"pcb": true
},
[
"Esc",
"!\n1",