<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: QuantumCat</title>
    <description>The latest articles on DEV Community by QuantumCat (@quantumcatpy).</description>
    <link>https://dev.to/quantumcatpy</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4185720%2F9b538500-bd81-43d6-8873-cfa555e00bf5.png</url>
      <title>DEV Community: QuantumCat</title>
      <link>https://dev.to/quantumcatpy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/quantumcatpy"/>
    <language>en</language>
    <item>
      <title>I Turned Three Beginner Python Scripts Into a Windows Desktop App</title>
      <dc:creator>QuantumCat</dc:creator>
      <pubDate>Thu, 15 Oct 2026 01:54:57 +0000</pubDate>
      <link>https://dev.to/quantumcatpy/i-turned-three-beginner-python-scripts-into-a-windows-desktop-app-d8o</link>
      <guid>https://dev.to/quantumcatpy/i-turned-three-beginner-python-scripts-into-a-windows-desktop-app-d8o</guid>
      <description>&lt;h1&gt;
  
  
  I Turned Three Beginner Python Scripts Into a Windows Desktop App
&lt;/h1&gt;

&lt;p&gt;In May 2026 I was teaching myself cybersecurity the way a lot of people&lt;br&gt;
do: tutorials, notes, and a vague feeling that I didn't actually&lt;br&gt;
understand what my own computer was doing on the network. So I wrote&lt;br&gt;
three small Python scripts to find out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Network-Monitor&lt;/strong&gt; (&lt;code&gt;net_watch.py&lt;/code&gt;, 57 lines) — poll &lt;code&gt;ss -tun&lt;/code&gt; every
3 seconds, diff against the last snapshot, print and log new
connections, tag each peer LOCAL or EXTERNAL, keep a top-talkers count.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port_scanner&lt;/strong&gt; (~25 lines) — prompt for an IP, sequential
&lt;code&gt;connect_ex&lt;/code&gt; scan over 11 common ports with a 1-second timeout,
print the open ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Snapshot-Report&lt;/strong&gt; (~100 lines of &lt;code&gt;os.popen&lt;/code&gt;) — write a timestamped
triage report of the machine, plus a basic "suspicious process"
check.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They were beginner scripts, and I mean that as a precise technical&lt;br&gt;
description.&lt;/p&gt;
&lt;h2&gt;
  
  
  The embarrassing parts (which were the education)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The committed monitor didn't run.&lt;/strong&gt; Line 19 is missing a closing&lt;br&gt;
parenthesis, and an &lt;code&gt;if&lt;/code&gt; further down is misindented. It sat on GitHub,&lt;br&gt;
publicly broken, because I never ran the committed copy. Lesson zero&lt;br&gt;
of shipping anything: run the thing you ship, from a clean checkout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My monitor tagged the wrong endpoint.&lt;/strong&gt; The script grabbed the first&lt;br&gt;
IP-looking token on each line — the &lt;em&gt;local&lt;/em&gt; endpoint, i.e. my own&lt;br&gt;
machine, forever. What a watcher cares about is the peer. It also&lt;br&gt;
classified "private" by string prefix (&lt;code&gt;10.&lt;/code&gt;, &lt;code&gt;192.168.&lt;/code&gt;, &lt;code&gt;127.&lt;/code&gt;),&lt;br&gt;
which silently misses the whole 172.16.0.0/12 private range — and&lt;br&gt;
CPython's &lt;code&gt;ipaddress&lt;/code&gt; module has opinions about CGNAT space&lt;br&gt;
(100.64.0.0/10) that a failing test had to teach me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My port scanner couldn't say "closed."&lt;/strong&gt; Open ports printed;&lt;br&gt;
everything else was silence. Closed (connection refused) and filtered&lt;br&gt;
(timeout) are different answers, and a scanner that can't tell them&lt;br&gt;
apart is only telling you a third of the story. It was also&lt;br&gt;
sequential — up to a second per port of just… waiting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My suspicious-process detector flagged "sync."&lt;/strong&gt; The check was a&lt;br&gt;
substring search of the &lt;code&gt;ps aux&lt;/code&gt; output for names like &lt;code&gt;nc&lt;/code&gt;. "Sync"&lt;br&gt;
contains "nc". A name heuristic is a hint to go look; it is not&lt;br&gt;
detection, and pretending otherwise sends you chasing ghosts.&lt;/p&gt;
&lt;h2&gt;
  
  
  The rebuild
&lt;/h2&gt;

&lt;p&gt;I rewrote all three properly and combined them into one app, the&lt;br&gt;
&lt;strong&gt;QuantumCat SOC Toolkit&lt;/strong&gt;: a Tkinter GUI (stdlib only — no framework)&lt;br&gt;
with five tabs — Monitor, Port Scanner, Snapshot Report, AI Analyst,&lt;br&gt;
Settings/About.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The monitor parses &lt;code&gt;ss&lt;/code&gt; output into structured records, classifies
IPs properly, and keys events on the peer endpoint with clean
&lt;code&gt;process name (pid)&lt;/code&gt; labels. (On Windows, where there's no &lt;code&gt;ss&lt;/code&gt;, it
uses psutil with a &lt;code&gt;netstat -ano&lt;/code&gt; parser as fallback.)&lt;/li&gt;
&lt;li&gt;The scanner is threaded, covers 25 well-known ports with service
names, reports open/closed/filtered as distinct states, and does an
optional passive banner grab — it reads what a service volunteers,
nothing more.&lt;/li&gt;
&lt;li&gt;The snapshot report keeps the original's soul — one timestamped file
you can hand to someone — but every section degrades to an
"(unavailable)" line instead of crashing, and the flagged-process
check compares actual process names, labelled in the app as the
basic heuristic it is.&lt;/li&gt;
&lt;li&gt;Everything is covered by test suites, because of lesson zero.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The local AI analyst
&lt;/h2&gt;

&lt;p&gt;The fourth tab is the new idea. It collects what the other tabs found&lt;br&gt;
and produces a plain-English assessment in a fixed template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;VERDICT: one line
What looks normal
What deserves a second look
Suggested next steps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It runs on a &lt;strong&gt;local model via Ollama&lt;/strong&gt; — plain HTTP to &lt;code&gt;localhost&lt;/code&gt;,&lt;br&gt;
the only network destination in the app besides your own scans. A&lt;br&gt;
security tool that phones your data home to a cloud AI would be a bad&lt;br&gt;
joke, so there is no cloud anything: no accounts, no telemetry, no&lt;br&gt;
analytics. And if you don't have Ollama, a built-in rule engine&lt;br&gt;
produces the same template from the same findings, so the app works&lt;br&gt;
out of the box either way. Ollama just writes smarter explanations.&lt;/p&gt;

&lt;h2&gt;
  
  
  The packaging lesson (the biggest one)
&lt;/h2&gt;

&lt;p&gt;My first instinct was to ship the way my scripts lived: Linux, a&lt;br&gt;
folder, run it from a terminal. Two problems. The actual user machine&lt;br&gt;
was &lt;strong&gt;Windows&lt;/strong&gt;. And "works if you know the incantation" is not&lt;br&gt;
"works."&lt;/p&gt;

&lt;p&gt;An earlier build proved it: extract a ZIP, the executable bit gets&lt;br&gt;
dropped, and the file manager asks "open with what?" — dead on&lt;br&gt;
arrival for a normal person. So the standard became a rule:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It should feel like installing Wireshark, not like adopting a&lt;br&gt;
project.&lt;/strong&gt; Double-click, install, desktop shortcut, click the cat,&lt;br&gt;
app opens.&lt;/p&gt;

&lt;p&gt;What shipped:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A real Windows &lt;strong&gt;&lt;code&gt;.msi&lt;/code&gt; installer&lt;/strong&gt; — per-user, no admin prompt,
Desktop and Start Menu shortcuts with the cat icon, clean uninstall
through Windows Settings.&lt;/li&gt;
&lt;li&gt;A Linux &lt;strong&gt;&lt;code&gt;.deb&lt;/code&gt;&lt;/strong&gt; for the Debian/Ubuntu family and a portable
&lt;strong&gt;&lt;code&gt;.tar.gz&lt;/code&gt;&lt;/strong&gt; (tar preserves the exec bits the ZIP lost).&lt;/li&gt;
&lt;li&gt;The full Python source included in the download, for transparency
and for anything the packaged builds don't cover.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No terminal gymnastics on either platform. The only add-on is Ollama,&lt;br&gt;
and the included &lt;code&gt;Start_Here&lt;/code&gt; guide walks through installing it and&lt;br&gt;
pulling a model step by step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limits
&lt;/h2&gt;

&lt;p&gt;This is a learning and triage tool built by a self-taught developer.&lt;br&gt;
It is not a replacement for professional security software, and it is&lt;br&gt;
not a packet analyzer — Wireshark is still king there. This toolkit's&lt;br&gt;
job is watching, summarising, and explaining: what is my machine&lt;br&gt;
talking to, what's listening on it, and what does that probably mean,&lt;br&gt;
in words a person can act on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The original scripts (flaws and all):
&lt;a href="https://github.com/Quantumcat-py/Network-Monitor" rel="noopener noreferrer"&gt;Network-Monitor&lt;/a&gt; ·
&lt;a href="https://github.com/Quantumcat-py/Port_scanner" rel="noopener noreferrer"&gt;Port_scanner&lt;/a&gt; ·
&lt;a href="https://github.com/Quantumcat-py/Snapshot-Report" rel="noopener noreferrer"&gt;Snapshot-Report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The finished toolkit ($12, one-time, Windows + Linux, source
included):
&lt;a href="https://quantumcatsoc.gumroad.com/l/quantumcat-soc-toolkit" rel="noopener noreferrer"&gt;https://quantumcatsoc.gumroad.com/l/quantumcat-soc-toolkit&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're early in learning this stuff: build the bad tool. Then fix&lt;br&gt;
it in public. The fixing is where the understanding lives.&lt;/p&gt;

</description>
      <category>python</category>
      <category>cybersecurity</category>
      <category>beginners</category>
      <category>ollama</category>
    </item>
  </channel>
</rss>
