Last active
November 1, 2024 05:14
-
-
Save c0d3z3r0/ad471f5dff71bb0ca10531f717542805 to your computer and use it in GitHub Desktop.
Decrypt and re-encrypt Supermicro BMC config backups
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
enSSL.config MouseMode resolv.conf system_elog | |
Encrypt | |
tar -czf save_config_new.tar.gz preserve_config | |
(rhash save_config_new.tar.gz -p "%c" | sed -r 's/(..)(..)(..)(..)/\4\3\2\1/' | xxd -r -ps; cat save_config_new.tar.gz) >save_config_new.dec | |
openssl enc -e -des-ede3-cbc -in save_config_new.dec -out save_config_new.bin -K f1da33a298120612060792ffaa998811998877445588aabb -iv 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment