Skip to content

Instantly share code, notes, and snippets.

View fdobrovolny's full-sized avatar

Filip Dobrovolný fdobrovolny

View GitHub Profile
@fdobrovolny
fdobrovolny / README.md
Created January 14, 2026 02:35
Reverse Engineering Report: Eurocase EA610 USB Protocol

Reverse Engineering Report: Eurocase EA610 /MEC0003 UPS (String-Descriptor Protocol)

All of this has been done with help of LLM I don't understand much of it, but the python script works and returns real data and I provided the data from Wireshark myself.

1. Device Identification

  • Vendor: Eurocase
  • Model: EA610 (1000VA)
  • USB ID: 0001:0000
  • Internal Chip ID: MEC0003 (String Index 1)
  • Firmware: V4.20 (String Index 12)
@fdobrovolny
fdobrovolny / upload.py
Created March 25, 2021 15:29
Command line utility to generate curl commands with presigned AWS S3 upload POST URLs
#!/usr/bin/env python
"""
This command line utility enables you to easily create presigned
urls for uploading files. This can be usdeful for running on
remote machines without risking to copy over your credentials.
Filip Dobrovolny <[email protected]> 2020
"""
@fdobrovolny
fdobrovolny / gist:66068fbbcacff1a748b98fb59dcad826
Created December 1, 2019 00:37
Ghost 502 image upload STRACE
epoll_pwait(3, [{EPOLLIN, {u32=21, u64=21}}], 1024, 1000, NULL, 8) = 1
accept4(21, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = 22
mprotect(0x9e021c04000, 503808, PROT_READ|PROT_WRITE) = 0
mprotect(0x9e021c84000, 503808, PROT_READ|PROT_WRITE) = 0
mprotect(0x9e021e84000, 503808, PROT_READ|PROT_WRITE) = 0
mprotect(0x9e021f04000, 503808, PROT_READ|PROT_WRITE) = 0
mprotect(0x9e021f84000, 503808, PROT_READ|PROT_WRITE) = 0
mprotect(0x9e021e04000, 86016, PROT_READ|PROT_WRITE) = 0
mprotect(0x9e021d84000, 86016, PROT_READ|PROT_WRITE) = 0
mprotect(0x9e021d04000, 86016, PROT_READ|PROT_WRITE) = 0
@fdobrovolny
fdobrovolny / fortuna.xml
Last active May 9, 2019 22:27
Match example
<Match Id="21489630" Name="Liverpool - Tottenham" MatchDate="2019-06-01T21:00:00" HasLiveMatch="false" HasVideoStream="false">
<Teams>
<Team Id="4324" Name="Liverpool"/>
<Team Id="115375" Name="Tottenham"/>
</Teams>
<Bets>
<Bet Id="21489630" Info="307" TypeId="1" Name="Zápas" Note="finále / Madrid">
<Odds Id="68525071" Name="1">1.98</Odds>
<Odds Id="68525072" Name="0">3.6</Odds>
<Odds Id="68525073" Name="2">4.05</Odds>
@fdobrovolny
fdobrovolny / filter.py
Last active October 31, 2019 08:39
Pass multiple parametrs into Django filter
"""Pass multiple parametrs into Django filter.
Inspired by http://stackoverflow.com/a/24402622/2629036.
By this filters you can chain as many variables into parametrs as you like.
You can even make different lengths for one filter.
WARNING: You have to apply n_chain_end filter at the end of the n_chains.
Thanks to this the intial var can also be tupple.
@fdobrovolny
fdobrovolny / settings.py
Created January 5, 2017 21:29
Django get settings in template
import re
from django import template
from django.conf import settings
register = template.Library()
ALLOWABLE_VALUES = ("CONSTANT_NAME_1", "CONSTANT_NAME_2", "template_\w*")