Skip to content

Instantly share code, notes, and snippets.

@ledeuns
ledeuns / smcbmc_backup_crypt.txt
Created January 11, 2024 10:49 — forked from c0d3z3r0/smcbmc_backup_crypt.txt
Decrypt and re-encrypt Supermicro BMC config backups
Decrypt
openssl enc -d -des-ede3-cbc -in save_config.bin -out save_config.dec -K f1da33a298120612060792ffaa998811998877445588aabb -iv 0
dd if=save_config.dec bs=4 skip=1 | tar -xzf -
ls preserve_config/
bmc_hostname hostname_for_dhcp network SDRBlock tag
ddns ipctrl ntp server.pem timezone
DDNS_CONFIG lighttpd.conf OEMPSBlock service.conf wsman
ddns.key lighttpd_port.conf PSBlock snmpd.conf
ddns.private log ps.xml syslog.conf
@ledeuns
ledeuns / gist:dd3f1530d2f232049174078aad37ba19
Created September 12, 2022 14:49
Explorer hangs when preview pane is enabled on WIndows 10
Kill MSEdgeWebView2.exe - https://www.reddit.com/r/WindowsHelp/comments/u4n0gk/comment/i88awri/
@ledeuns
ledeuns / gist:4a3862a2912f29bdb7c9f3b6fbecde1c
Created May 1, 2021 07:37
route in another subnet (2)
inet6 2607:5300:60:62ac:: 64
!route add -inet6 -net 2607:5300:60:62ff::/64 -cloning -link -iface ix0
!route add -inet6 default 2607:5300:60:62ff:ff:ff:ff:ff
@ledeuns
ledeuns / gist:96cb611d713f07448887fc371b80d649
Created October 11, 2020 08:17
Generate Cargo dependencies list for OpenBSD port
cargo tree --format "MODCARGO_CRATES +=^{p}^# {l}" --prefix none | tr '^' '\t' | sort | uniq | grep -v '*' | grep -v "`pwd`" | sed 's/ v/ /g'
@ledeuns
ledeuns / conv.py
Last active May 28, 2022 16:52 — forked from jonlundy/conv.py
#!/usr/bin/python
#
# Converted from https://gist.github.com/JonLundy/f25c99ee0770e19dc595 to Python3
import sys,json,base64,binascii
with open(sys.argv[1]) as fp:
pkey=json.load(fp)
def enc(data):
missing_padding = 4 - len(data) % 4
if missing_padding:
@ledeuns
ledeuns / gist:8d3310a0a2f13df24e19984c61254dc1
Created June 23, 2019 08:19
Add EPSG:3857 in QGis on OpenBSD
Download https://github.com/qgis/QGIS/blob/master/resources/srs.db to /usr/local/share/qgis/resources/srs.db
0 – Aérien FT
1 – Aérien EDF
2 – Façade
3 – Immeuble
4 – Pleine terre
5 – Caniveau
6 – Galerie
7 – Conduite
8 - Égout
Run as zimbra user: zmprov ms `zmhostname` zimbraIPMode both ; libexec/zmiptool ; zmcontrol restart
@ledeuns
ledeuns / gist:07491f636190291e0a5a0179997fe7e8
Created June 26, 2018 12:01
Ubiquiti ER-4 OpenBSD boot command
setenv bootcmd 'usb reset; fatload mmc 0 $(loadaddr) bsd; bootoctlinux rootdev=sd0 numcores=$(numcores)'
@ledeuns
ledeuns / auvernix.c
Created February 13, 2018 15:16
AuvernIX wishes 2016
/* CACA_DRIVER=raw ./figfont "Happy New Year from AuvernIX ! We wish you many peerings & much bandwidth for 2016. A massive 'thank you' to our supportive members. We love you ! Contact us @AuvernIX or contact@auvernix.org if you'd like to join." | cacaserver */
//#include "config.h"
#if !defined(__KERNEL__)
# include <stdio.h>
# include <stdlib.h>
#endif
#include "caca.h"