<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Python on LANRAT</title><link>https://lanrat.com/tags/python/</link><description>Recent content in Python on LANRAT</description><generator>Hugo -- 0.162.0</generator><language>en-us</language><copyright>Ian Foster</copyright><lastBuildDate>Sat, 15 Nov 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://lanrat.com/tags/python/rss.xml" rel="self" type="application/rss+xml"/><item><title>MikroTik SwOS Python Library</title><link>https://lanrat.com/projects/mikrotik-swos-python-library/</link><pubDate>Sat, 15 Nov 2025 00:00:00 +0000</pubDate><guid>https://lanrat.com/projects/mikrotik-swos-python-library/</guid><description>&lt;p&gt;Got a bunch of MikroTik switches running SwOS or SwOS Lite with no good way to manage them centrally? This library has you covered.&lt;/p&gt;
&lt;p&gt;Built by reverse engineering the SwOS HTTP API, it provides complete programmatic access to all switch features. Works with both SwOS and SwOS Lite, supports everything from port configs and PoE to VLANs and SNMP settings.&lt;/p&gt;
&lt;p&gt;Comes with a CLI tool for quick lookups and a full Ansible module for managing your entire switch fleet through YAML playbooks. Compatible with CRS305, CRS310, CRS326, CSS610 and other SwOS-based switches.&lt;/p&gt;</description><content:encoded><![CDATA[<p>Got a bunch of MikroTik switches running SwOS or SwOS Lite with no good way to manage them centrally? This library has you covered.</p>
<p>Built by reverse engineering the SwOS HTTP API, it provides complete programmatic access to all switch features. Works with both SwOS and SwOS Lite, supports everything from port configs and PoE to VLANs and SNMP settings.</p>
<p>Comes with a CLI tool for quick lookups and a full Ansible module for managing your entire switch fleet through YAML playbooks. Compatible with CRS305, CRS310, CRS326, CSS610 and other SwOS-based switches.</p>
]]></content:encoded></item><item><title>ARIN IPv4 Waitlist Tracking</title><link>https://lanrat.com/projects/arin-ipv4-waitlist-tracking/</link><pubDate>Sat, 20 Sep 2025 00:00:00 +0000</pubDate><guid>https://lanrat.com/projects/arin-ipv4-waitlist-tracking/</guid><description>&lt;p&gt;ARIN IPv4 Wait-list Tracking analyzes ARIN&amp;rsquo;s IPv4 address wait-list and provides statistical insights into wait times and allocation patterns. The Python-based system tracks historical data on IPv4 block requests and clearances to estimate processing times for different network block sizes.&lt;/p&gt;
&lt;p&gt;The web dashboard displays real-time analytics including current wait-list sizes, estimated wait times for /22, /23, and /24 blocks, and historical trends in IPv4 address allocation. This tool helps network administrators understand IPv4 scarcity patterns and plan address allocation strategies as IPv4 exhaustion continues.&lt;/p&gt;</description><content:encoded><![CDATA[<p>ARIN IPv4 Wait-list Tracking analyzes ARIN&rsquo;s IPv4 address wait-list and provides statistical insights into wait times and allocation patterns. The Python-based system tracks historical data on IPv4 block requests and clearances to estimate processing times for different network block sizes.</p>
<p>The web dashboard displays real-time analytics including current wait-list sizes, estimated wait times for /22, /23, and /24 blocks, and historical trends in IPv4 address allocation. This tool helps network administrators understand IPv4 scarcity patterns and plan address allocation strategies as IPv4 exhaustion continues.</p>
]]></content:encoded></item><item><title>GPM2Spotify History</title><link>https://lanrat.com/projects/gpm2spotify-history/</link><pubDate>Thu, 13 Feb 2025 00:00:00 +0000</pubDate><guid>https://lanrat.com/projects/gpm2spotify-history/</guid><description>&lt;p&gt;GPM2Spotify History converts Google Play Music listening history data to Spotify-compatible JSON format. The Python scripts process HTML activity files exported from Google Play Music and generate structured JSON data that can be used with modern music tracking and analysis tools.&lt;/p&gt;
&lt;p&gt;The conversion tool helps users migrate their historical listening data from the discontinued Google Play Music service to formats compatible with current music platforms and personal analytics tools. It parses activity HTML exports and transforms the data into standardized JSON structures for further processing.&lt;/p&gt;</description><content:encoded>&lt;p>GPM2Spotify History converts Google Play Music listening history data to Spotify-compatible JSON format. The Python scripts process HTML activity files exported from Google Play Music and generate structured JSON data that can be used with modern music tracking and analysis tools.&lt;/p>
&lt;p>The conversion tool helps users migrate their historical listening data from the discontinued Google Play Music service to formats compatible with current music platforms and personal analytics tools. It parses activity HTML exports and transforms the data into standardized JSON structures for further processing.&lt;/p>
</content:encoded></item><item><title>Luxer One</title><link>https://lanrat.com/projects/luxer-one/</link><pubDate>Sun, 21 Feb 2021 00:00:00 +0000</pubDate><guid>https://lanrat.com/projects/luxer-one/</guid><description>&lt;p&gt;Luxer One is a Python API client for the Luxer One Residential package management system. The library provides programmatic access to check package delivery status, retrieve pending packages, and interact with smart locker systems commonly found in apartment complexes and residential buildings.&lt;/p&gt;
&lt;p&gt;The client handles authentication with the Luxer One API and includes example code demonstrating basic operations such as logging in and querying package information. This enables automated monitoring and management of package deliveries through the Luxer One platform.&lt;/p&gt;</description><content:encoded>&lt;p>Luxer One is a Python API client for the Luxer One Residential package management system. The library provides programmatic access to check package delivery status, retrieve pending packages, and interact with smart locker systems commonly found in apartment complexes and residential buildings.&lt;/p>
&lt;p>The client handles authentication with the Luxer One API and includes example code demonstrating basic operations such as logging in and querying package information. This enables automated monitoring and management of package deliveries through the Luxer One platform.&lt;/p>
</content:encoded></item><item><title>TRIPLEX DVRLink DVR468RW Exploit</title><link>https://lanrat.com/posts/triplex-dvrlink-dvr468rw-exploit/</link><pubDate>Thu, 20 Jun 2013 20:00:00 +0000</pubDate><guid>https://lanrat.com/posts/triplex-dvrlink-dvr468rw-exploit/</guid><description>Security analysis and brute force exploit for TRIPLEX DVRLink DVR468RW surveillance system password recovery using Python automation.</description><content:encoded><![CDATA[<p>At an internship I had a while ago one project assigned to me was to regain access to a CCTV security system which we had been locked out of for some years. (The previous manager left without leaving the password.)</p>
<p>The DVR system was a TRIPLEX DVRLink DVR468RW, whatever that is. It seemed cheap; a small embedded computer with video in/out, a hard-drive and CD-RW drive for recording storage. The administration interface was accessed either by a web server running on the device or a desktop client you installed on your computer.</p>
<p>My initial thought was to remove the device&rsquo;s internal clock battery to reset the password back to the default of &ldquo;1234&rdquo;, no dice. Next on the list of things to try was examining the hard-drive in a desktop computer to see if the password could be viewed or reset. The hard drive had a single partition with some old surveillance video footage; nothing to do with settings or authentication. Further examination of the main board revealed a flash memory chip which I assumed stored the device&rsquo;s configuration, including the administration password.</p>
<p>Let me step back here… The administration password could be entered either over one of the remote management interfaces (the desktop client or web server) or physically on the devices keypad. The keypad had the buttons: <code>[1]</code>, <code>[2]</code>, <code>[3]</code>, <code>[4]</code> and <code>[ENTER]</code>.  Well isn&rsquo;t that interesting; it looks as if the password can only be made up of at most 4 characters. And the desktop client nicely informs me that when entering a password it must be between 4 and 8 characters long, that leaves only 87,296 possibilities.</p>
<p>So, onto the next attack! Knowing that this device had such a limited amount of possible options for the password a brute force attack wouldn&rsquo;t be bad at all. After spending a lot of time examining unsuccessful login attempts from the desktop client in Wireshark and understanding their proprietary protocol, I wrote my first useful python script to automate the process. After a few false positives and tweaks, I was able to get the program to generate a list of every possible password combination for the device and try them out. Within a minute of running I had the device&rsquo;s long lost administration password of &ldquo;1324&rdquo; (It has since been changed).</p>
<p>After logging in as the Administrator I was able to see that there were other accounts on the system as well. And my program worked equally well for all of them. However it is currently hard-coded to use the Administrator username.  You may change it if you wish, but why bother? 😉</p>
<p>Attached to this post is both the exploit and manual for the TRIPLEX DVRLink DVR468RW. I hope that either may be useful to someone. (In a law abiding way)</p>
<p><a href="https://gist.github.com/lanrat/bbdc421247480691a9c4f5427a083667">DVR_exploit.py</a> (Developed and tested with Python 3 running on Windows XP)</p>
<p><a href="https://store.2600.com/products/copy-of-copy-of-copy-of-season-year"><img alt="2600 Magazine" loading="lazy" src="/posts/triplex-dvrlink-dvr468rw-exploit/images/sp131_large.gif"></a></p>
<p>This article has been published in <a href="https://store.2600.com/products/copy-of-copy-of-copy-of-season-year">2600 Magazine issue Spring 2013; Volume 30, Number one</a>!</p>
]]></content:encoded></item></channel></rss>