About


Name: Damian Pasternok
Nick: crh
Nationality: Polish
Residence: Warsaw
Occupation: one-man army
Workplace: PepsiCo, Inc. - Warsaw, Poland
Interests: POSIX operating systems, programming, security, astronomy, astrophysics, music (playing piano, drums), mechanical wrist watches, chess, trekking, survival, urban exploration, railroads, submarines, and many more.
Contact: IRC: #katedra at IRCnet (channel metrics)
Email: <my forename> at pasternok.org, PGP: local or mirrors: keyserver.ubuntu.com, pgp.mit.edu

Warning!

Above address or any other address that you might know or try to guess (including a corporate mailbox), even if it is not published anywhere, are made available only for private communications and I don't want to receive any advertisements, offers and other bulk mailings. Sending such things to the addresses you authorize me to place your addresses on any available blacklists and blocking them everywhere and every time. Sending bulk mail to the addresses you authorize me to make your message publicly available. More about it: https://www.cauce.org/.

Geek Code


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT/M/MU/S d- s:+ a C+++$ UB+++$L++++$ P+$ L++++$
!E W++ N+ o+ !K !w !O M+ !V PS PE Y+ PGP++ !t !5 !X
!R tv-() b++(+++) DI D G e+++>++++ h+>- r++(+++) y+
------END GEEK CODE BLOCK------
ungeek

Programming


Various source codes - more or less recent. All of them are licensed under GPLv3.

Python

» Mi Air Purifier Munin Plugin

images/munin/airpurifiermiot_stats.png

Mi Air Purifier stats plugin for Munin monitoring tool.

The plugin monitors all significant parameters measured by Mi Air Purifier devices. Those are: AQI and average AQI (μg/m³), humidity (%), temperature (°C), filter life remaining (%), filter use (h), device total use (h), purify volume (m³) and motor speed (rpm).

It should be compatible with all devices specified in the python-miio AirPurifierMiot's device class (under _MAPPINGS), however it has been tested with Mi Air Purifier Pro H.

In order to configure the plugin one has to obtain the device token (HOWTO).

» Tuya WiFi Smart Plug Munin Plugin

images/munin/tuya_powermon.png

Tuya WiFi Smart Plug power stats plugin for Munin monitoring tool.

The plugin monitors basic power parameters (current, power, voltage) that are measured by a wide range of WiFi smart power plugs compatible with Tuya IoT Platform and Smart Life application (tested with Gosund SP111).

The plugin utilizes the tinytuya Python library to collect the metrics. For devices running the latest protocol version 3.3 it additionally requires to specify an encryption/decryption key to exchange data with each device. The procedure of obtaining such key is documented on the library's page (the idea is to link your devices between the Smart Life app and the iot.tuya.com portal and authorize the Device Connection Service to fetch the list of registered devices, including their secret keys).

» NUT Battery Runtime Munin Plugin

images/munin/nut_batt_runtime.png

Network UPS Tools battery runtime plugin for Munin monitoring tool.

The plugin reads the estimated runtime values from all UPS-es that are configured in the upsmon's configuration file (upsmon.conf).

Each device has to return a valid ups.runtime parameter once the configuration is read by upsc, which for some drivers (eg. blazer_usb) may require to be configured through a manual calibration. Otherwise, without this parameter set, the UPS will not be shown.

» Sense HAT Munin Plugin

images/munin/sensehat_humidity.png images/munin/sensehat_pressure.png images/munin/sensehat_temperature.png

Raspberry Pi Sense HAT board triple sensor plugin for Munin monitoring tool.

There is also an alternative version available with an additional 1-Wire DS18B20 digital thermometer defined, used for measuring the outdoor temperature.

» Load Average 2 Munin Plugin

images/munin/load2.png images/munin/load2_alt.png

A variation on the original load plugin from the Munin Plugin Gallery, inspired by Cacti's load average graph and color scheme. The plugin displays load averages as a stacked graph, showing the 1-minute, 5-minute, and 15-minute averages. An alternative version is also available, where 5-minute and 15-minute averages are represented by linear graphs.

» Wake On Lan - Magic Packet

PyGTK-based tool for sending broadcast frame called Magic Packet to turn on a computer remotely (tested in local networks and Internet). The program uses remote or local Top-level Domains list downloaded from IANA to validate the FQDN (can be updated by --update-tlds option).

There are two ways to use Wake On LAN over Internet:

  1. You can send Magic Packet directly to broadcast address. For example 23.12.78.56/255.255.192.0 will send MP to 23.12.127.255.
  2. If the computer is behind NAT you need a special iproute2 and iptables rules to forward broadcast messages.

Example:

#

#

The example above works for 192.168.0.0/24, where 192.168.0.254 is an unused IP, eth1 - WAN interface, eth0 - LAN. The iproute2 command assigns 192.168.0.254 address to MAC ff:ff:ff:ff:ff:ff. The iptables command forwards received packets from port 48777 to 192.168.0.254:48777 - this address has assigned the broadcast MAC, so all packets are sent to every computer in LAN.

» ipv6calc

Simple utility to calculate pointer domain names for IPv6 prefixes.

Example #1:

$

Output:
 

Example #2:
$

Output:
 

» vhosts

images/vhosts-230826.png

Simple utility to generate a list of available IRC virtual hosts (vhosts) based on IPv4/IPv6 addresses assigned to a given network interface.

» RTBackup

Real-time backup script which periodically checks modification time of each file and creates backup of the file if it has been modified, with preserve the file and parent directories structure and permissions.

Random

» CVE-2021-33909 (Sequoia) *bigdir* directory cleaner for Qualys PoC exploit show
» AnyMote Smart Remote App AMSR definition file for Microlab Solo 7C speakers show

» muninlite OpenWrt >= 21.02.0 patch

  Fix for some buggy sed df regular expressions:
  - now it parses uniquely all filesystems (especially virtual filesystems)
  - warnings/criticals for /rom filesystem are disabled by default
  - DF_IGNORE_FILESYSTEM_REGEX can still be used to exclude any filesystem

  An older version compatible with LEDE >= 17.01.0 and OpenWrt >= 18.06.0 <= 19.07.x is available here.

show

» Linux vmsplice Local Root Exploit fix/patch for 2.6.23.14(-grsec) (CVE-2008-0009, CVE-2008-0010)

show

» Linux >= 2.4.4, >= 2.6.0 NULL pointer dereference due to incorrect proto_ops initializations fix (CVE-2009-2692)

Temporary fix:

#
show

» NVIDIA 96.43.05 Display Driver patch for Linux 2.6.26

show

» Slackware packages and SlackBuilds

browse

» Very old Linux kernel configurations for desktop (vanilla+grsec w/NAT, ACPI, I2C, USB DSL modem, etc.) and server (Hardened Gentoo w/ iptables, PaX/grsecurity and QoS)

browse

Articles


Retro (vel Museum)

Ambient


This is essentially electronic atmosphere music designed to relax the listener with its soothing vibes. Generally under 90 bpm or totally beatless, ambient music takes you on a relaxing or thoughtful journey using a variety of sounds, from wind and whale sound samples, to richly textured electronic landscapes.

» Mooma - Shelter

Fun


Other


Links


GNU and Linux

Sites of my friends

Demoscene


Copyright © 2005 - 2024 Damian Pasternok / Last modified: 2024-10-19 00:27:17 UTC
Still viewable with Any Browser!