The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,726 other followers

Archive for the ‘Python’ Category

Last year, a classic Mojibake was introduced when Waterschap Amstel, Gooi en Vecht redesigned their IT systems

Posted by jpluimers on 2022/03/16

Last year, Waterschap Amstel, Gooi en Vecht sent me a paper letter notifying the yearly water bill was going to be late as they were redesigning their IT systems.

Their letter introduced a classic Mojibake that had not been present in all their older paper letter communication.

  • Street name on a letter via the old IT systems is "Pyreneeën":

    Pyreneeën goed geprint.

  • Street name on a letter via the new IT systems is "Pyreneeën":

    Pyreneeën geprint met Mojibake vervormingen.

Read the rest of this entry »

Posted in Development, Encoding, ftfy, Mojibake, Python, Software Development, Unicode, UTF-8, UTF8 | Leave a Comment »

The things I didn’t notice during cancer survival: ftfy 6.0 and more versions got released during my recovery

Posted by jpluimers on 2022/03/10

When writing this, [Wayback/] ftfy · PyPI:history indicates ftfy was already at 6.0.3.

It is still my goto tool for figuring out the cause of Mojibake. I remember writing about it the first time in 2016 (see the ftfy category) when it was already at version 3.0, discovering it after a few Mojibake posts.

By now it even understands right-to-left Mojibake garbage: [] Elia Robyn Speer on Twitter: “ftfy 5.8 is out! … A user reported that Hebrew text wasn’t being fixed, and this made me think about how to expand some of the trickier cases to non-Latin alphabets.”

Mojibake mishaps still happen a lot, so by now I hope I will have done a Mojibake themed Delphi talk at one or more conferences.

Read the rest of this entry »

Posted in !!con (bangbangcon), About, Autistic Spectrum/Autism, Cancer, Conference Topics, Conferences, Development, Encoding, Event, ftfy, Mojibake, Personal, Python, Rectum cancer, Scripting, Software Development, Unicode | Leave a Comment »

How do I drop a bash shell from within Python? – Stack Overflow

Posted by jpluimers on 2022/03/09

I needed this for my blog post tomorrow:

import os
os.system('sh') # or bash, tcsh, zsh, whatever. :-P

[Wayback] How do I drop a bash shell from within Python? – Stack Overflow

Thanks [Wayback] Chris Jester-Young!

This trick works at the Python shell.


Posted in Development, Python, Scripting, Software Development | Leave a Comment »

Egardia/Woonveilig: some notes about logging on a local gateway to see more detailed information on the security system

Posted by jpluimers on 2022/02/23

A follow-up on Source: Some links with notes on WoonVeilig/Egardia security system communications, protocols and support by 3rd party home automation apps:

Notes on the Woonveilig/Egardia GATE-03 model alarm hub (where 192.168.x.y is the IPv4 address that hub):

  1. It still uses the plain-text insecure http to communicate, so it is wise to try and put it in a separate LAN apart from other systems.
  2. Logon is done using HTTP Basic access authentication.
  3. Woonveilig/Egardia by now prefers the XMPP prototol over the CID protocol (the CID protocol is still used by jeroenterheerdt/python-egardia.
    • You can find the configuration at http://192.168.x.y/setting/xmpp.htm.
    • XMPP protocol uses
      • as primary and as secondary server on port 443.
      • arg-####-auth  where ###### are the last 6 *lowercase* hexadecimal digits of the MAC address of the GATE-03.
      • a long password you can find in the plain-text of the http://192.168.x.y/action/xmppGet http GET request fired by http://192.168.x.y/setting/xmpp.htm.
  4. CID protocol address is ip:// where ###### are the last 6 *uppercase* hexadecimal digits of the MAC address of the GATE-03.
  5. User PIN-codes are not visible at the Woonveilig/Egardia alarm site, but they are at http://192.168.x.y/setting/userCode.htm together with their user names.
  6. Special PIN codes for Installer/Duress/Guard/Master/Temporary are at http://192.168.x.y/setting/codeSetting.htm and obtained via http://192.168.x.y/action/areaListGet and http://192.168.x.y/action/codeSettingGet
  7. On the CID protocol:

I got all of the above via: [Wayback/] GATE-03 system does not report to Egardiaserver · Issue #26 · jeroenterheerdt/python-egardia (which by coincidence used the same firmware I had: HSGW HPGW-L2-XA35H).

Which brings me to some Google search with some remarkable results:

So I did a quick look at LUPUS XT* based products:

Then at the Woonveilig/Egardia and Climax shops:


  • Egardia/Woonveilig sensors look remarkably similar to the LUPUS ones
  • LUPUS is a re-brand of Climax with slightly different firmware

Side note on open ports

  • Open ports on the [Wayback] GATE-03 alarm device:
    9/tcp   filtered discard
    25/tcp  filtered smtp
    80/tcp  open     http
    445/tcp filtered microsoft-ds
  • Open ports on the [Wayback] CAM-06 outdoor camera:
    9/tcp     filtered discard
    21/tcp    open     ftp          oftpd
    25/tcp    filtered smtp
    80/tcp    open     tcpwrapped
    445/tcp   filtered microsoft-ds
    554/tcp   open     rtsp
    711/tcp   open     cisco-tdp?
    1935/tcp  open     rtmp?
    6000/tcp  open     X11?
    49152/tcp open     upnp         Portable SDK for UPnP devices 1.6.17 (Linux 3.4.35; UPnP 1.0)



Posted in Communications Development, Development, Python, Scripting, Software Development | Leave a Comment »

console convert pcap to wav: not easily possible; use the WireShark GUI to do

Posted by jpluimers on 2021/12/01

Wanting a simple way on the console to convert a .pcap file to a .wav file, I searched for [Wayback] console convert pcap to wav – Google Search.

The reason is that [Wayback] fritzcap (written in Python) sometimes crashes while doing the conversion of a phone recording, so then only the .pcap file is available. I still want to figure this out, but given my health situation, I might not be able to in time.

If anyone with Python experience can help, I have failing capture files lying around, and the fritzcap command-line does support decoding [Wayback/]:

# feature/re-add_documentation(+0/-0)* ± python --help
usage: [-h] [-v] [-c] [-d [file [file ...]]] [-m] [-p password]
                   [-u username] [-s] [--config_file path_to_file]
                   [--logging_config path_to_file] [--box_name host_or_IP]
                   [--call_service_port port] [--login_not_required]
                   [--protocol protocol] [--cap_folder path_pattern]
                   [--cap_file file_pattern] [--cap_interface cap_interface]
                   [--after_capture_time time_in_seconds]
                   [--decode_workers_count int]

main arguments:
  -d [file [file ...]], --decode_files [file [file ...]]
                        the list of captured files to decode. All the new
                        captures files will be decode automatically if the
                        --capture switch is set. Read the files from the
                        standard input if the list of files is empty and there
                        is no capture work.

Back to other tooling for decoding VoIPcap/pcap files

Too bad there are no easy solutions. You can use the WireShark GUI to do this, which is OK for infrequent conversions.

Here were some of the results leading me to that conclusion:


Posted in *nix, *nix-tools, Development, fritzcap, Power User, Python, Scripting, Software Development, Wireshark | Leave a Comment »

%d bloggers like this: