Skip to content

Instantly share code, notes, and snippets.

@TheGroundZero
TheGroundZero / solis_meter.py
Created February 16, 2022 12:27
Read modbus data from Ginlong Solis inverter and send over MQTT. For more info, see blog post.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Read modbus data from Ginlong Solis inverter
# and send over MQTT
#
# Based on https://github.com/rogersia/Solis-4G
# Includes fixes, small modifcations and refactoring. Migrated to Python3.
# See https://sequr.be/blog/2021/08/reading-ginlong-solis-inverter-over-serial-and-importing-in-home-assistant-over-mqtt/
#
@TheGroundZero
TheGroundZero / gitlab_enum.sh
Last active April 7, 2022 12:11
Unauthenticated Information Disclosure in Gitlab allows for enumeration/bruteforce of groups and projects
#!/bin/bash
# Script by TheGroundZero (@DezeStijn)
#
# https://sequr.be/blog/2020/06/gitlab-unauthenticated-group-and-project-enumeration/
# https://gist.github.com/TheGroundZero/ea067760fd6c3854238f098cb075bf96
#
# Using a difference in behaviour by Gitlab in setting cookies
# it's possible to enumerate/bruteforce groups/projects
# as an unauthenticated user.
@TheGroundZero
TheGroundZero / shelly_roller_ha.yaml
Last active August 3, 2022 16:10
Home Assistant configuration for Shelly 2.5 in Roller Mode
# Shelly 2.5
# Roller Mode
# Based on https://shelly-api-docs.shelly.cloud/?shell#shelly2-5-mqtt
# And https://www.home-assistant.io/integrations/cover.mqtt/
cover:
- platform: mqtt
name: Rolling Shutters
command_topic: shellies/shellyswitch25-<deviceid>/roller/0/command # rc, open, close and stop
state_topic: shellies/shellyswitch25-<deviceid>/roller/0 # open, close, stop
@TheGroundZero
TheGroundZero / burp_rijksregisternummer-generator.py
Last active October 8, 2022 22:21
Burp Intruder payload generator for Belgian Social Security Number (rijksregisternummer)
# Script by TheGroundZero (@DezeStijn)
#
# This payload generator generates valid Belgian Social Security Numbers
# This SSN (rijksregisternummer) is formatted as yy.mm.dd-counter-check
# yy, mm and dd are the date of birth
# counter is a 3 digit number, which counts the births per day (uneven number for men and even for women)
# check is a 2 digit validation number based on the previous digits
#
# You can provide a "seed" to the generator to set a static birth date.
# This will result in a random generation of the counter and check values.
@TheGroundZero
TheGroundZero / ha_broadlink-rm4pro.yaml
Created October 7, 2020 09:59
Configuration for a Broadlink RM4 Pro in Home Assistant, including some IR codes for an LG TV
@TheGroundZero
TheGroundZero / ha_darebee_daily.yaml
Last active July 18, 2023 15:23
Display DAREBEE daily challenge on Home Assistant dashboard
---
# Create an image entity showing the DAREBEE daily challenge
#
# https://www.home-assistant.io/integrations/image/
# https://darebee.com/daily
# https://sequr.be/blog/2023/07/darebee-daily-challenge-on-home-assistant-dashboard/
#
scrape:
- resource: https://darebee.com/
scan_interval: 3600 # Every hour
@TheGroundZero
TheGroundZero / esp32_ssd1306.yaml
Last active October 31, 2023 20:00
SSD1306 OLED Display and ESP32 dev kit v1
# ESP32 board:
# - https://www.aliexpress.com/item/1005001267643044.html
# SSD1306 OLED Display:
# - https://s.click.aliexpress.com/e/_AVnlEn
# ESPHome docs:
# - https://esphome.io/components/display/ssd1306.html
# - https://esphome.io/components/i2c.html#i2c
# - https://esphome.io/components/display/index.html#formatted-text
# Wiring diagram
@TheGroundZero
TheGroundZero / esphome_ir_lg.md
Last active November 10, 2023 10:16
LG infrared codes captured using ESPHome Remote Receiver
@TheGroundZero
TheGroundZero / shelly_config-all.sh
Created April 15, 2021 13:14
Simple loop using cURL to change the config of all Shellys in a network
# See docs on HTTP API
# https://shelly-api-docs.shelly.cloud/#settings
# Linux / Mac
for i in {2..254}; do curl -m 1 http://192.168.1.$i/settings?<setting parameters>; done
# Windows
# Note: use %% instead of % when saving this in a BATCH script (.bat)
FOR /L %I IN (2,1,254) DO curl -m 1 http://192.168.1.%I/settings?<setting parameters>
# --- EXAMPLES ---
@TheGroundZero
TheGroundZero / esp32_ttgo_t5_213.yaml
Created May 8, 2021 23:05
TTGO T5 v2.3.1 2.13" display in ESPHome
# Board
# https://s.click.aliexpress.com/e/_9IDl91
# ESPHome docs:
# - https://esphome.io/components/display/waveshare_epaper.html
# - https://esphome.io/components/spi.html#spi
# - https://esphome.io/components/display/index.html#formatted-text
substitutions:
esphome_name: esp32_ttgo_t5