Skip to content

Instantly share code, notes, and snippets.

View funkman's full-sized avatar

Tim Funk funkman

  • East Petersburg PA
View GitHub Profile
@funkman
funkman / gist:76f55332a756ba9fc05e606bf63c2503
Created December 15, 2021 16:26
Remove JNDI classes from log4j-core-2X via zip (Info-ZIP) CVE-2021-44228 + CVE-2021-45046 mitigation
zip -d log4j-core-2.14.0.jar 'org/apache/logging/log4j/core/net/JndiManager.class' 'org/apache/logging/log4j/core/util/JndiCloser.class' 'org/apache/logging/log4j/core/selector/JndiContextSelector.class' 'org/apache/logging/log4j/core/net/JndiManager$1.class' 'org/apache/logging/log4j/core/lookup/JndiLookup.class' 'org/apache/logging/log4j/core/net/JndiManager$JndiManagerFactory.class'
@funkman
funkman / ssl_log.conf
Created May 7, 2019 18:50
Logging SSL version
# Log the ssl version used - Helpful to capture legacy clients later
LogFormat "%a %t %{SSL_PROTOCOL}x %U" ssl
CustomLog logs/ssl_version_log ssl
@funkman
funkman / capture_dbms.groovy
Created September 6, 2018 12:02
Capture DBMS_OUTPUT.PUT_LINE in java (actually groovy)
Connection con = getYourDbConnectionObject();
/* Enable the capturing of the buffer */
Statement s = con.createStatement()
s.executeUpdate("begin dbms_output.enable(); end;");
s.close();
/* Run your proc */
CallableStatement cs = con.prepareCall("{call MY_STORED_PROC_HERE}")
cs.execute()
@funkman
funkman / remove-geometrixx.sh
Created September 1, 2016 12:13
Remove all geometrixx (and other sample content) from AEM 6.2
#!/bin/sh
# UNINSTALL PACKAGES
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/adobe/aem6/sample/we.retail.download-1.0.8.zip?cmd=uninstall
sleep 2
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/adobe/aem6/sample/we.retail.download-1.0.8.zip?cmd=delete
sleep 2
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/aemfd/cq-geometrixx-gov-pkg-3.0.6.zip?cmd=uninstall
sleep 2
@funkman
funkman / gist:e340af75be3313ee62a0b4015d2c7cb4
Created August 24, 2016 15:59
Bookmarket to remove various non-adblocked cruft
// Removes videos, various top/side/bottom rails that have crap, share and comment bars etc
javascript:void((function(){y=document.querySelectorAll('#adBlockerContainer,.robots-nocontent,.OUTBRAIN,.ad,.video-embed,.standard-video,.inline-media,aside.article-rail,object,video,iframe,div[itemprop=video],#sharebar,#addthis,#sidebar-right,.rightSidebar,.cnnplayer,.js-livefyre-comments,.outbrain-relateds,.outbrain-recommended,.right-rail,.side,.widget-area,.sidebar,.sidebar-wrapper,.gdl-right-sidebar,.related_post,.comments-wrapper,#sidebar,#secondary.widget-area,.sticky-social-share,.social-share');for (var x=0;x<y.length;x++){y[x].remove()}}()))