Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Sichere ProgrammierungHow to Stop Your Android App from Draining the Battery with Wake Locks(01.10.2026 um 16:15 Uhr)
•
Sichere ProgrammierungBuild and Publish a Full-Stack Mobile App with AI(01.10.2026 um 17:13 Uhr)
•••
Sichere Programmierungpwd in rust(02.10.2026 um 07:29 Uhr)
•••
Sichere ProgrammierungNobody Withholds For You: Working Out Your Own Freelance Tax Set-Aside(02.10.2026 um 07:30 Uhr)
•
Sichere ProgrammierungWhy Traditional Webhooks Break Under RPM Load(02.10.2026 um 07:32 Uhr)
•
Sichere ProgrammierungOracle Manipulation Risk Report: Rocket Pool(02.10.2026 um 07:34 Uhr)
•
Sichere ProgrammierungHow to Stop Your Android App from Draining the Battery with Wake Locks(01.10.2026 um 16:15 Uhr)
•
Sichere ProgrammierungBuild and Publish a Full-Stack Mobile App with AI(01.10.2026 um 17:13 Uhr)
•••
Sichere Programmierungpwd in rust(02.10.2026 um 07:29 Uhr)
•••
Sichere ProgrammierungNobody Withholds For You: Working Out Your Own Freelance Tax Set-Aside(02.10.2026 um 07:30 Uhr)
•
Sichere ProgrammierungWhy Traditional Webhooks Break Under RPM Load(02.10.2026 um 07:32 Uhr)
•
Sichere ProgrammierungOracle Manipulation Risk Report: Rocket Pool(02.10.2026 um 07:34 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

WIR - What Is Running: A CLI Tool in C to Inspect Processes and Ports

I recently released wir (What Is Running), a command-line tool written in C to inspect what's running on specific ports and get detailed process information. A…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!

I recently released wir (What Is Running), a command-line tool written in C to inspect what's running on specific ports and get detailed process information. A project born from a practical need that turned into an opportunity to explore system programming in C.






The Problem



How many times have you had a port occupied without knowing which process is using it? Or needed to trace a process hierarchy to understand who spawned what? We usually resort to combinations of lsof, netstat, and ps, but why not have everything in a single command?






The Solution



wir is a cross-platform tool (macOS and Linux) that allows you to:




  • Discover which process is using a specific port

  • Get detailed information about a PID

  • Visualize the complete ancestry tree of a process

  • List all running processes

  • View a process's environment variables

  • Output in normal, short, JSON, or tree format

  • Receive security warnings for potentially risky configurations






Practical Examples






# Who's using port 8080?
wir --port 8080

# Info about a specific process
wir --pid 1234

# Show the process ancestry tree
wir --pid 1234 --tree

# JSON output for scripting
wir --port 3000 --json

# List all processes (short format)
wir --all --short

# Security warnings only
wir --port 8080 --warnings









The Architecture



The project is structured in a modular way:





  • Platform abstraction layer: handles differences between Linux (/proc parsing) and macOS (libproc and sysctl)


  • Output formatting: supports multiple display modes without duplicating logic


  • Consistent error handling: every allocation is checked, every resource is freed


  • Strict memory management: no leaks, no undefined behavior






What I Learned



Writing wir was an excellent opportunity to practice fundamental concepts:





  1. System programming: interfacing with /proc, system calls, process management


  2. Cross-platform development: conditional compilation and different APIs for each OS


  3. Memory safety in C: manual memory management without a garbage collector


  4. Build systems: Makefile with automatic platform detection


  5. API design: clean and composable interface






I Don't Memorize Commands



As my approach goes: I'm not interested in memorizing the exact lsof or netstat commands. I prefer understanding the underlying architecture and building tools that solve the problem more elegantly. wir isn't just a wrapper, it's an abstraction that hides the complexity of OS differences.






The Future



The project is open to extensions:




  • UDP port support

  • Advanced process filtering

  • Support for other OSes (BSD, etc.)

  • Performance optimizations

  • Additional output formats






Try It Out



wir



It's a learning project, so feel free to experiment and extend it. Building system tools in C is a great way to understand what's really happening under the hood.




# Build and install
brew tap AlbertoBarrago/tap
brew install wir

# Start using it
wir --port 3000


🔍 CTI & Forensik

Cyber Threat Intelligence & Forensik

Bedrohungsgraph · ATT&CK-Mapping · Exploit-Belege
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
2 Knoten · 1 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten WIR - What Is Running: A CLI Tool in C to Inspect Processes and Ports

Thematisch verwandte Begriffe: What, Running, Tool, Inspect · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag