Urgent.News

What's breaking now, across hundreds of outlets.

Tech

The Polish Pass — I Rewrote My Three Beginner Scripts to Match the App They Became

A few weeks ago I wrote about turning three beginner Python scripts — a connection monitor, a port scanner, and a snapshot reporter — into the QuantumCat SOC Toolkit , a desktop app with a real installer and a local AI analyst. There was a loose end, and it itched. The app had moved on. The GitHub repos hadn't. Anyone who clicked through from the toolkit to the original scripts still landed on…

A few weeks ago, I wrote about turning three beginner Python scripts—connection monitor, port scanner, and snapshot reporter—into the QuantumCat SOC Toolkit, a desktop app with a real installer and local AI analyst. However, an issue remained. The app progressed, but the GitHub repositories remained unchanged. Anyone who clicked from the toolkit to the original scripts would still land on the May 2026 versions: a monitor that didn't work, a scanner that couldn't report "closed," and a process check that falsely flagged "sync" for containing "nc."

To address this, I conducted a polish pass, upgrading all three scripts to the same standard as the shipped toolkit. All repositories kept their original structure and transparency rules. The monitor script expanded from 57 lines to 373 lines. Instead of polling the ss command every 3 seconds, it now keyed events on the peer endpoint (the actual address being communicated with).

The rewrite used the ipaddress module for accurate IP classification, including full RFC1918 ranges, loopback, link-local, IPv6 ULA, and CGNAT space. It included a silent baseline on the first poll for a more seamless user experience and proper structure, such as a ConnectionTracker for differencing connections and clean process name labels.

The port scanner improved from prompting for an IP and checking 11 ports one at a time to threading 32 workers for faster sweeps. It now shows 25 well-known ports with service names and provides three distinct states—open, closed, and filtered. The snapshot report doubled in size from 81 lines to 440 lines. Instead of using os.popen, it now uses psutil for better process information.

It checks for exact process names against a short list of known dual-use tools, rather than substring searches, to avoid false positives. The report gracefully degrades if data sources are unavailable, still saving timestamped files as before. Importantly, the git history remains intact, showing the broken first commits alongside the improved code.

The READMEs now describe both the original broken scripts and the polished versions, with clear explanations of changes made. This approach maintains transparency and provides valuable learning material for future learners. The polish pass ensures the free scripts and paid app maintain the same high standard of work, with the toolkit behind the app as the natural progression.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Synchronous, Asynchronous, and Promise in Javascript

1. Synchronous JavaScript Synchronous means code executes one line at a time, in order. The next line waits until the current line finishes. Example: console . log ( " First " ); console .

  • Synchronous JavaScript executes code line by line, sequentially.
  • Asynchronous JavaScript allows concurrent execution of operations.
  • Promise represents outcome of asynchronous operation, in Pending, Fulfilled, or Rejected state.

Audit contests: $451 of prize money per submission in 2024, $85 in 2026

Disclosure: the data collection, the analysis, the code and this post were made with AI agents working for me, MV2 of Munim, Inc. Every number below comes from an open dataset you can re-run yourself…

  • Prize money per submission dropped to $85 in 2026
  • Total prize money rose to $1.56 million in 2026
  • Only 22% of 97 audits paid out any prize money

More from Thursday, 15 October 2026 →