Skip to content

Instantly share code, notes, and snippets.

View elbosso's full-sized avatar

Jürgen Key elbosso

View GitHub Profile
interface=wlp2s0
dhcp-range=10.10.10.2,10.10.10.250,255.255.255.0,12h
dhcp-option=3,10.10.10.1
dhcp-option=6,10.10.10.1
server=192.168.10.1
log-queries
log-dhcp
listen-address=127.0.0.1
# Specify the default route
dhcp-option=3,10.10.10.1
interface=wlp2s0_0
dhcp-range=172.16.15.2,172.16.15.250,255.255.255.0,12h
dhcp-option=3,172.16.15.1
dhcp-option=6,172.16.15.1
server=192.168.10.1
log-queries
log-dhcp
listen-address=127.0.0.1
# Specify the default route
dhcp-option=3,172.16.15.1
#!/bin/bash
# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# Generate new wlan password and safe it. Don't use special chars to make it simpler
WLANPSK=$(pwgen -1Bv |tr '/' '$')
#!/usr/bin/python
import sys
import pyqrcode
program_name = sys.argv[0]
argument = sys.argv[1]
url = pyqrcode.create(argument)
print(url.terminal(quiet_zone=1))
#!/bin/bash
ssid=$1
mac=$2
RAWPSK=$(pwgen -1Bv |tr '/' '$')
ENCODEDPSK=$(wpa_passphrase "${ssid}" "${RAWPSK}" |grep psk|tail -n 1|cut -d '=' -f 2)
echo $mac $ssid $RAWPSK $ENCODEDPSK
# Generate QR code pictures for Android and Windows
qrencode -t PNG -o /tmp/android_${mac}.png -s 4 "WIFI:T:WPA;S:${ssid};P:${RAWPSK};H:${hidden};"
./terminalqr.py "WIFI:T:WPA;S:${ssid};P:${RAWPSK};H:${hidden};" >/tmp/android_${mac}.txt
#!/bin/bash
apt-get update && apt-get -y upgrade
apt-get install git git-core cmake libusb-1.0-0-dev build-essential usbutils pkg-config joe mono-complete wget
lsusb
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make install
<?xml version="1.0" encoding="utf-8" ?>
<InstallerSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<WebServerPort>8090</WebServerPort>
</InstallerSettings>
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
before_script:
- echo 'New job started'
after_script:
- echo 'Job finished'
stages:
- clean
- build-processors
- generate-algorithms
- generate-util
- generate-other-sources
@elbosso
elbosso / InfluxDBAppender.java
Created June 23, 2018 08:35
Appender for Log4j 1 streming logging events right into a time series database (InfluxDB)
package de.elbosso.util;
//This is by no means production-ready code!
/*Copyright (c) 2012-2018.
Juergen Key. Alle Rechte vorbehalten.
Weiterverbreitung und Verwendung in nichtkompilierter oder kompilierter Form,
mit oder ohne Veraenderung, sind unter den folgenden Bedingungen zulaessig:
1. Weiterverbreitete nichtkompilierte Exemplare muessen das obige Copyright,
die Liste der Bedingungen und den folgenden Haftungsausschluss im Quelltext