Skip to content

Instantly share code, notes, and snippets.

@echo off
for /f "delims=[] tokens=2" %%a in ('ping -4 -n 1 %ComputerName% ^| findstr [') do set NetworkIP=%%a
echo Network IP: %NetworkIP%
netsh interface ipv4 install
netsh interface portproxy show all
netsh advfirewall firewall show rule name="Minecraft Proxy 12345"
@topolik
topolik / json-deserialization-ldap.sh
Created August 17, 2018 20:49
Backend script based on @pwntester JSON deserialization research
#!/bin/bash
echo "Starting Apache DS using docker @ ldap://localhost:10389"
docker run --name json-deser-ldap -d -p 10389:10389 greggigon/apacheds
echo "... waiting 20 seconds to start Apache DS"
sleep 20
# password: secret, if used with LDAP login
(cat <<"EOF"
@topolik
topolik / dump-fragments-with-[].ftl
Last active December 14, 2021 13:50
freemarker dump
[#assign recursionDepth=1 /]
<b>Namespace vars</b>
<pre>
.main
=====
[@listnamespace namespaceName=".main" /]
</pre>
@topolik
topolik / gtk.css
Last active April 18, 2018 11:24
nemo desktop transparent window
/*
https://github.com/linuxmint/nemo/blob/b87d88da325c0e75ff563afe4bb140e2216e3187/gresources/nemo-style-application.css
~/.config/gtk-3.0/gtk.css
*/
.nemo-window * {
background: transparent;
}
#========================
#Disable tests:
#========================
build.gradle:
allprojects {
if(it.name.contains("-test")) {
it.tasks.all { task -> task.enabled = false }
}
@topolik
topolik / .multitailrc
Created January 4, 2018 16:34
multitail
check_mail:0
# tomcat
colorscheme:tomcat
##time
cs_re:blue:^[0-9]*-[0-9]*-[0-9]* [0-9]*:[0-9]*:[0-9]*,[0-9]*
cs_re:blue:^[0-9:,]+
cs_re:blue:^... [0-9 :,]+ [APM]{2}
## log4j
@topolik
topolik / init.gradle
Created December 20, 2017 16:39
Don't download sources for IDEA task in init.gradle
allprojects {
apply plugin: 'idea'
idea {
module {
downloadSources = false
}
}
}
@topolik
topolik / id_rsa.pub
Created August 12, 2017 09:09
stary-dell public key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCqJSKd6+OsXHwC4cU7FeUR6958hPiGKpKvMy//u/Bv16iwGbImNVK2iffHQFiJ04JVZwTCrFIMYLArKmU4V3kAns0Eq6Wa7Rp1ySEPvAuD1+r2BtwKPdAii4SKdczn+iTHtfLrEOBu+kL/KE16BQJ1qi63WuIhGtue9Z/BdF+rZ3/XfCAc0qudAF5HWeodfCUcSBv1Xf5S7SJ3MjEfMNKlFOAokcw9kvv2mbEES9HriKuIkjZbW08wtGIpEhpW/NrFHATaxXwnTDvYrQO8EZ/xQx6MzaBatdljz6C4bquYTFEes1jbgmTl9IiafZSs9uldc4Wu+WPPPeIOjuJxGbILmRnXW2pAgkCIMnPXmCp1b9bFgKzNcE1ppM5xIw3J9qK4o6zn6RaL3B2LSIIDsrZZ7qlSVtbgx2fMY5qG63Gp7S4WxcwVVfF4J40hciFfqhd6W6Aj5QTQe6XitrayhUj1kBym6kgC3Yohj3zMDijAfiyreTaJbzUYpyO+8Vt97aTLq/g9E/MlzxSgzRX/QWcudFyJsgwTwmrRe5kZrVfztttFz0xk0dvwfVaspkeltju1wSjjAxz9caIM/1y1QrZbnxsll3Gzmq+MYoL+/fgudBynI4AiXIwQwwwGLu4ZxdzyQNjEj3I/K7jCb/secip5vWjRe6LSw+KFLCGlCOT2BQ== topolik@stary-dell
@topolik
topolik / sign-in-js
Last active May 23, 2017 14:54
Liferay sign-in bookmark
javascript:(xaf = prompt('username:password', 'test:test')) && (location.href = "data:text/html,<h1 id=msg>signing out ...</h1><img style=display:none src="+Liferay.ThemeDisplay.getPortalURL()+"/c/portal/logout onerror='msg.innerText=\"signing in ...\";document.forms[0].submit()'><form style=display;none method=post action='"+Liferay.ThemeDisplay.getPortalURL()+"/c/portal/login?login="+ encodeURIComponent(xaf.split(':')[0] + '@liferay.com') + '&redirect=' + encodeURIComponent(Liferay.currentURL)+"'/><input name=password value='"+xaf.split(':')[1]+"'/></form>")
@topolik
topolik / create-user.js
Created April 7, 2016 12:51
Liferay bookmarks
javascript: (xaf = prompt('nickname (will be also passwd)', 'test2')) && Liferay.Service('/user/add-user', { companyId: Liferay.ThemeDisplay.getCompanyId(), autoPassword: false, password1: xaf, password2: xaf, autoScreenName: false, screenName: xaf, emailAddress: xaf + '@liferay.com', facebookId: 0, openId: '', locale: '', firstName: xaf, middleName: '', lastName: xaf, prefixId: 0, suffixId: 0, male: true, birthdayMonth: 0, birthdayDay: 1, birthdayYear: 1970, jobTitle: '', groupIds: null, organizationIds: null, roleIds: null, userGroupIds: null, sendEmail: false}, function(obj) {alert(JSON.stringify(obj));if (typeof(obj) == 'object') { location.href='/c/portal/logout?referer=' + encodeURIComponent('/c/portal/login?login='+xaf+'@liferay.com&password='+xaf);}});