Skip to content

Instantly share code, notes, and snippets.

@sedrubal
sedrubal / cpio.py
Created July 22, 2023 13:39
cpio parser
#!/usr/bin/python3
"""
Docs: https://www.systutorials.com/docs/linux/man/5-cpio/
Implements the old binary format.
TODO does only support regular files
TODO does not yet extract the files
"""
@sedrubal
sedrubal / clean.sh
Created May 14, 2023 11:14
Clean Fahrradverkehrsdaten from offenedaten-koeln.de
for f in *.csv; do
new_file_name=$(echo $f | cut -d'_' -f 4 | cut -d' ' -f 6)
echo $new_file_name
encoding=$(file -N --mime-encoding "${f}" | cut -d':' -f2)
iconv -f ${encoding} -t utf-8 "${f}" |
sed 's/^M\+$//' |
sed 's/\.//g' |
sed -r 's/Jan(uar| [0-9]+)/01/;s/Feb(ruar| [0-9]+)/02/;s/(März|Mrz [0-9]+)/03/;s/Apr(il| [0-9]+)/04/;s/Mai(| [0-9]+)/05/;s/Jun(i| [0-9]+)/06/;s/Jul(i| [0-9]+)/07/;s/Aug(ust| [0-9]+)/08/;s/Sep(tember| [0-9]+)/09/;s/Okt(ober| [0-9]+)/10/;s/Nov(ember| [0-9]+)/11/;s/Dez(ember| [0-9]+)/12/' |
sed -r 's/Jahr [0-9]+//' |
sed 's/Jahressumme.*$//' > "${new_file_name}"
@sedrubal
sedrubal / cava.spec
Created October 27, 2015 21:52
cava - RPM SPEC
Name: cava
Version: 0.3.5
Release: 1%{?dist}
Summary: Console-based Audio Visualizer for Alsa
Group: Applications/Multimedia
License: MIT
URL: https://karlstav.github.io/%{name}/
Source0: https://github.com/karlstav/%{name}/archive/%{version}.tar.gz
@sedrubal
sedrubal / Thinkpad P70 prototype
Last active July 1, 2017 14:36
Validity90 prototype output
Prototype version 10b
Found device 138a:0090
Index 1, size 12
0000 65 38 38 35 38 34 35 33 35 34 36 35
usb write:
0000 01
usb read:
0000 00 00 f0 b0 5e 54 a4 00 00 00 06 07 01 30 00 01
0010 00 00 8e 58 48 35 45 56 00 23 00 00 00 00 01 00
@sedrubal
sedrubal / CVE-2017-6513.md
Last active April 19, 2017 06:37
WHMCS Reseller Module V2 for Softaculous Virtualizor Privilege Escalation

Security Advisory for CVE-2017-6513

CVE ID: CVE-2017-6513: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-6513

Dates

  • 2017-03-06 01:00 CET: Sebastian discovered the vulnerability while using the software provided by IP Interactive UG. He tried to estimate the consequences of this issue.
  • 2017-03-06 02:00 CET: Sebastian contacted IP Interactive UG, because he thought it's an issue in their specific installation.
  • 2017-03-06 before 14:15 CET: IP Interactive UG contacted Softaculous and received a patch for this issue. He reported this to Sebastian and the issue could not be reproduced anymore.
  • 2017-03-06 14:20 CET: During a discussion with Julian we found out that this issue needs a CVE-ID and a public announcement. Sebastian tried to gather information. He asked IP Interactive UG and tried to install the software locally.
@sedrubal
sedrubal / mumble.spec
Created October 6, 2015 00:51
mumble - RPM SPEC
# Because of a bug you have to run:
#sudo ln -s /usr/include/speech-dispatcher/libspeechd.h /usr/include/libspeechd.h
#sudo ln -s /usr/include/speech-dispatcher/libspeechd_version.h /usr/include/libspeechd_version.h
# And you should verify the download by using the signature:
#https://github.com/mumble-voip/mumble/releases/download/1.2.10/mumble-1.2.10.tar.gz.sig
Name: mumble
Version: 1.2.10
Release: 1%{?dist}
Summary: Mumble VoIP Client/Server
@sedrubal
sedrubal / wp_feed_import.py
Created February 10, 2017 20:32
Import posts from (Drupal) RSS feed to WordPress
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Import posts from RSS feed and bring it to WordPress export format.
This works for our Drupal 6.
It prints the content of the WordPress export xml (wpx) to stdout and
all images that have to be imported manually to stderr.

Keybase proof

I hereby claim:

  • I am sedrubal on github.
  • I am sedrubal (https://keybase.io/sedrubal) on keybase.
  • I have a public key whose fingerprint is 1106 DDBC 2093 58B8 1396 1CC3 B83D 4C8C EB8A BFF6

To claim this, I am signing this object:

@sedrubal
sedrubal / opacapp1.svg
Created September 17, 2016 13:35
opacapp logo drafts
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sedrubal
sedrubal / debug.vcard
Created March 30, 2016 13:49
A broken contact image in vcard
BEGIN:VCARD
VERSION:3.0
UID:20140129T234653.1006b69f26@192.168.0.101
PRODID:+//IDN bitfire.at//DAVdroid/0.9.1.2 vcard4android ez-vcard/0.9.8
FN:Foo Bar
N:Foo;Bar;;;
TEL;TYPE=cell;PREF=1:1234
TEL:1234
TEL:1234
TEL;TYPE=cell:1234