Skip to content

Instantly share code, notes, and snippets.

View CyberLine's full-sized avatar

Alexander Over CyberLine

View GitHub Profile
@CyberLine
CyberLine / mitigate.sh
Last active September 9, 2023 09:08
vCenter 7.0 workaround for #CVE-2021-44228
cp /usr/lib/vmware-vmon/java-wrapper-vmon /usr/lib/vmware-vmon/java-wrapper-vmon.bak
cp /usr/lib/vmware-updatemgr/bin/jetty/start.ini /usr/lib/vmware-updatemgr/bin/jetty/start.ini.bak
cp /usr/lib/vmware/common-jars/log4j-core-2.8.2.jar /usr/lib/vmware/common-jars/log4j-core-2.8.2.jar.bak
cp /usr/lib/vmware-dbcc/lib/log4j-core-2.8.2.jar /usr/lib/vmware-dbcc/lib/log4j-core-2.8.2.jar.bak
zip -q -d /usr/lib/vmware-dbcc/lib/log4j-core-2.8.2.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
zip -q -d /usr/lib/vmware/common-jars/log4j-core-2.8.2.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
sed -i 's/exec $java_start_bin $jvm_dynargs $security_dynargs $original_args/log4j_arg="-Dlog4j2.formatMsgNoLookups=true"\nexec $java_start_bin $jvm_dynargs $log4j_arg $security_dynargs $original_args/g' /usr/lib/vmware-vmon/java-wrapper-vmon
sed -i 's/exec $java_start_bin $jvm_dynargs "$@"/log4j_arg="-Dlog4j2.formatMsgNoLookups=true"\nexec $java_start_bin $jvm_dynargs $log4j_arg "$@"/g' /usr/lib/vmware-vmon
@CyberLine
CyberLine / mqtt.cfg
Last active March 4, 2019 20:06
Sample for integrate Shelly1 Units in Openhab 2.3 via MQTT binding
# place in "services" subfolder
mosquitto.url=tcp://localhost:1883
mosquitto.qos=2
@CyberLine
CyberLine / davical.sh
Created September 20, 2012 12:55
Synology Diskstation DAViCal Installation Script
#!/bin/sh
# check for bootstrap installation
if [ !$(which ipkg) ]; then
echo "ipkg not found. Please install bootstrap package first!";
echo "See: http://forum.synology.com/wiki/index.php/How_to_Install_Bootstrap";
exit;
fi;
# install system tools and second postgres
@CyberLine
CyberLine / gist:297979
Created February 8, 2010 08:11
Ubuntu 9.10 Upstart Script to switch xorg.conf on Dell D620/D630 based on docking status. Place in /etc/init/ as gdmswitch.conf and add this line to gdm.conf: "and started gdmswitch"
description "xorg.conf switch"
start on (filesystem
and runlevel [2345]
and started hal
and stopped udevtrigger)
stop on runlevel [016]
emits gdmswitch