<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kawalostwal on Medium]]></title>
        <description><![CDATA[Stories by Kawalostwal on Medium]]></description>
        <link>https://medium.com/@kawalostwal?source=rss-9b21c2308d3a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1OkvwFAZ69MRlOIl</url>
            <title>Stories by Kawalostwal on Medium</title>
            <link>https://medium.com/@kawalostwal?source=rss-9b21c2308d3a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 06:14:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kawalostwal/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Medium Blog: Building an Nmap‑Inspired, Python Port Scanner for Real‑World Recon]]></title>
            <link>https://medium.com/@kawalostwal/medium-blog-building-an-nmap-inspired-python-port-scanner-for-real-world-recon-471c3a630f59?source=rss-9b21c2308d3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/471c3a630f59</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[batch-file]]></category>
            <category><![CDATA[nmap-scan]]></category>
            <category><![CDATA[port-scanning]]></category>
            <dc:creator><![CDATA[Kawalostwal]]></dc:creator>
            <pubDate>Tue, 09 Sep 2025 08:03:52 GMT</pubDate>
            <atom:updated>2025-09-09T08:03:52.227Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qpVU07rovP6STcnl" /><figcaption>Photo by <a href="https://unsplash.com/@rohanphoto?utm_source=medium&amp;utm_medium=referral">Rohan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you’ve ever found yourself needing a quick, flexible way to map open ports across your network, you’ve probably reached for Nmap. It’s the gold standard for network discovery and security auditing. Inspired by Nmap’s simplicity and power, I built a lightweight, Python-based port scanner that’s fast, flexible, and easy to run anywhere — Windows, macOS, or Linux.</p><p>This project is majorly inspired by Nmap and also draws ideas from a minimalist approach showcased in the Simple-Port-Scanner project on GitHub. References:</p><ul><li>Nmap official site: <a href="https://nmap.org/">nmap.org</a></li><li>Simple Port Scanner (Python): <a href="https://github.com/3ndG4me/Simple-Port-Scanner">Simple-Port-Scanner</a></li></ul><h4>Why build another port scanner?</h4><ul><li>Sometimes you need a quick, scriptable tool you can tweak and run locally without installing extra dependencies.</li><li>It’s a great way to understand how network scanning works at the socket level.</li><li>For automation and CI pipelines, smaller targeted tools are easier to integrate.</li></ul><h4>What it does</h4><ul><li>Scans single IPs, CIDR ranges, or comma-separated IP lists</li><li>Scans single ports, ranges (e.g., 1–1024), or comma-separated lists</li><li>Uses multi-threading for speed</li><li>Detects common services (e.g., SSH, HTTP, MySQL)</li><li>Exports results as TXT, JSON, or CSV</li><li>Verbose mode for live feedback</li><li>Windows-friendly with a .bat launcher</li></ul><h4>Under the hood: Architecture and approach</h4><ul><li>Core scanning uses Python’s socket with connect_ex to test TCP port reachability.</li><li>ThreadPoolExecutor drives concurrency — configurable worker count for different environments.</li></ul><p>Target parsing supports:</p><ul><li>Comma-separated targets: 192.168.1.1,192.168.1.2</li><li>CIDR blocks: 192.168.1.0/24</li></ul><p>Port parsing supports:</p><ul><li>Single: 22</li><li>Range: 1–1024</li><li>Comma-separated: 22,80,443</li></ul><p>Results are aggregated and summarized per IP, then exported if requested.</p><pre># Single IP, single port<br>python port_scanner.py 192.168.1.1 22<br><br># Single IP, port range<br>python port_scanner.py 192.168.1.1 1-1024<br><br># CIDR + single port<br>python port_scanner.py 192.168.1.0/24 22<br><br># Multiple IPs + multiple ports<br>python port_scanner.py 192.168.1.1,192.168.1.2 22,80,443<br><br># Faster scanning on a LAN<br>python port_scanner.py 192.168.1.0/24 1-1024 -w 400 -t 0.5 -v<br><br># Export to JSON<br>python port_scanner.py 192.168.1.1 1-65535 -o results.json --format json</pre><p>On Windows, you can also use:</p><pre>run_scanner.bat 192.168.1.1 22</pre><h4>Performance tuning tips</h4><ul><li>Threads (-w): 100 is a solid default. For fast networks, try 200–500. For slower links, drop to 50.</li><li>Timeout (-t): LAN scans do well at 0.5–1.0s. Internet targets typically need 2.0–5.0s.</li><li>Scope: Prefer targeted ports over full 1–65535 when you know what you’re looking for.</li></ul><h4>What this tool is (and isn’t)</h4><ul><li>It’s a fast, practical TCP port reachability scanner with strong ergonomics.</li><li>It’s not a full replacement for Nmap’s powerful scan techniques, OS fingerprinting, NSE scripting, or UDP scanning.</li><li>It’s excellent for quick reconnaissance, automation, teaching, and baseline assessments.</li></ul><h4>Ethics and legality</h4><p>Always scan responsibly:</p><ul><li>Scan only systems you own or have explicit permission to test</li><li>Respect rate limits and local policies</li><li>Keep logs and document your activities</li></ul><h4>Roadmap ideas</h4><ul><li>UDP scan mode (best-effort, with caveats)</li><li>Banner grabbing for richer service detection</li><li>Exclusion lists for targets and ports</li><li>Optional rate limiting</li><li>Colored terminal output and HTML reports</li><li>Plugin system for post-processing (e.g., notify on critical ports)</li></ul><h4>Credits</h4><ul><li>Major inspiration: Nmap (<a href="https://nmap.org/">nmap.org</a>)</li><li>Also inspired by the minimal approach in <a href="https://github.com/3ndG4me/Simple-Port-Scanner">Simple-Port-Scanner</a></li></ul><p>Whether you’re a security learner building intuition, a DevOps engineer wiring up checks, or a pentester doing scoped recon, this Python scanner gives you a clean, scriptable foundation you can run anywhere and extend as needed.</p><p>If you want to explore or contribute, the repository is here:</p><ul><li>GitHub: <a href="https://github.com/Kawal0508/Port-Scanning-tool">https://github.com/Kawal0508/Port-Scanning-tool</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=471c3a630f59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Python Keylogger: A Deep Dive into Cybersecurity Education]]></title>
            <link>https://medium.com/@kawalostwal/building-a-python-keylogger-a-deep-dive-into-cybersecurity-education-19e1d22808ba?source=rss-9b21c2308d3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/19e1d22808ba</guid>
            <category><![CDATA[system-programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Kawalostwal]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 15:01:49 GMT</pubDate>
            <atom:updated>2025-09-06T15:01:49.292Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A hands-on exploration of keyboard monitoring, ethical considerations, and practical cybersecurity learning</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PLeQa_agEcQ0rKDy" /><figcaption>Photo by <a href="https://unsplash.com/@terrillo?utm_source=medium&amp;utm_medium=referral">Terrillo Walls</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>In the world of cybersecurity, understanding how malicious software works is crucial for building better defenses. Today, I’m sharing my journey of building a Python-based keylogger tool — not for malicious purposes, but as an educational project that demonstrates fundamental cybersecurity concepts.</p><p>⚠️ <strong>Important Disclaimer:</strong> This project is strictly for educational and research purposes. Unauthorized keylogging is illegal and unethical. Only use this tool on systems you own or have explicit permission to monitor.</p><h3>Why Build a Keylogger?</h3><p>Before diving into the code, let’s address the elephant in the room: why would anyone want to build a keylogger? The answer lies in the principle of “knowing your enemy.”</p><h3>Educational Value</h3><ul><li>Understanding Attack Vectors: By building keyloggers, we understand how they work and can better defend against them</li><li>System Programming: Learning low-level system interactions and event handling</li><li>Data Structures: Working with JSON, timestamps, and structured logging</li><li>Ethical Hacking: Developing skills for legitimate penetration testing and security research</li></ul><h3>Legitimate Use Cases</h3><ul><li>Personal Monitoring: Tracking your own typing patterns or productivity</li><li>Research: Studying user behavior or keyboard interaction patterns</li><li>Troubleshooting: Diagnosing keyboard or input-related issues</li><li>Security Testing: Authorized testing of systems you own</li></ul><h3>The Technical Implementation</h3><p>Let’s explore the key components of our keylogger implementation:</p><h3>1. Core Dependencies</h3><pre>import pynput<br>from pynput.keyboard import Key, Listener<br>import json<br>import os<br>from datetime import datetime</pre><p>The <strong>pynput </strong>library is the backbone of our keylogger, providing cross-platform keyboard monitoring capabilities. It’s lightweight, well-maintained, and handles the complex task of intercepting keyboard events across different operating systems.</p><h3>2. Data Structure Design</h3><p>One of the most interesting aspects of this project is how we structure the captured data:</p><pre>keylog_data = {<br>    &quot;session_info&quot;: {<br>        &quot;start_time&quot;: f&quot;at {now.strftime(&#39;%H:%M:%S&#39;)} | on {now.strftime(&#39;%Y-%m-%d&#39;)}&quot;,<br>        &quot;total_keys&quot;: 0,<br>        &quot;special_keys&quot;: 0,<br>        &quot;regular_keys&quot;: 0<br>    },<br>    &quot;keystrokes&quot;: []<br>}</pre><p>This JSON-based approach provides several advantages:</p><ul><li>Structured Data: Easy to parse and analyze</li><li>Metadata Tracking: Session information alongside keystroke data</li><li>Extensibility: Easy to add new fields or modify the structure</li><li>Human Readable: JSON format is both machine and human-friendly</li></ul><h3>3. Event Handling Architecture</h3><p>The keylogger uses a callback-based architecture:</p><pre>def on_press(key):<br>    &quot;&quot;&quot;Callback function that runs when a key is pressed&quot;&quot;&quot;<br>    # Process key press event<br>    # Update counters<br>    # Add to keystroke log<br><br>def on_release(key):<br>    &quot;&quot;&quot;Callback function that runs when a key is released&quot;&quot;&quot;<br>    # Process key release event<br>    # Check for stop condition (ESC key)<br>    # Save data when stopping</pre><p>This design separates concerns and makes the code maintainable and testable.</p><h3>4. Key Classification System</h3><p>The implementation distinguishes between different types of keys:</p><pre>key_type = &quot;special&quot; if hasattr(key, &#39;char&#39;) == False else &quot;regular&quot;</pre><ul><li>Regular Keys: Letters, numbers, symbols (a, b, 1, 2, @, #)</li><li>Special Keys: Modifiers, function keys, arrows (Ctrl, Shift, F1, Arrow keys)</li></ul><p>This classification helps in analysis and provides insights into typing patterns.</p><h3>Advanced Features</h3><h3>1. Robust Error Handling</h3><pre>try:<br>    if hasattr(key, &#39;char&#39;) and key.char:<br>        key_info[&quot;key&quot;] = key.char<br>        keylog_data[&quot;session_info&quot;][&quot;regular_keys&quot;] += 1<br>    else:<br>        key_info[&quot;key&quot;] = str(key)<br>        keylog_data[&quot;session_info&quot;][&quot;special_keys&quot;] += 1<br>except AttributeError:<br>    key_info[&quot;key&quot;] = str(key)<br>    keylog_data[&quot;session_info&quot;][&quot;special_keys&quot;] += 1</pre><p>The code handles various edge cases and potential errors gracefully, ensuring the keylogger continues running even when unexpected input is encountered.</p><h3>2. Session Management</h3><p>The keylogger tracks comprehensive session information:</p><pre>{<br>  &quot;session_info&quot;: {<br>    &quot;start_time&quot;: &quot;at 14:30:22 | on 2024-12-01&quot;,<br>    &quot;end_time&quot;: &quot;at 14:35:15 | on 2024-12-01&quot;,<br>    &quot;total_keys&quot;: 10,<br>    &quot;regular_keys&quot;: 8,<br>    &quot;special_keys&quot;: 2,<br>    &quot;duration_seconds&quot;: 293.665556<br>  }<br>}</pre><p>This metadata is invaluable for analysis and provides context for the captured keystrokes.</p><h3>3. Graceful Shutdown</h3><p>The keylogger implements multiple shutdown mechanisms:</p><ul><li>ESC Key: Primary method for stopping the keylogger</li><li>Keyboard Interrupt: Handles Ctrl+C gracefully</li><li>Exception Handling: Saves data even if errors occur</li></ul><pre>if key == Key.esc:<br>    # Update session info with end time<br>    # Calculate duration<br>    # Save to JSON file<br>    stop_listener = True</pre><h3>Testing and Quality Assurance</h3><p>The project includes a comprehensive test suite (<strong>test_keylogger.py)</strong> that validates:</p><ol><li>Module Imports: Ensures all dependencies are available</li><li>Directory Creation: Tests log directory setup</li><li>File Operations: Validates JSON file creation and writing</li></ol><pre>def test_imports():<br>    &quot;&quot;&quot;Test if all required modules can be imported&quot;&quot;&quot;<br>    try:<br>        import pynput<br>        from pynput.keyboard import Key, Listener<br>        print(&quot;✅ All required modules imported successfully&quot;)<br>        return True<br>    except ImportError as e:<br>        print(f&quot;❌ Import error: {e}&quot;)<br>        return False</pre><h3>Ethical Considerations and Legal Framework</h3><h3>Legitimate Use Cases ✅</h3><ul><li>Educational Purposes: Learning cybersecurity concepts</li><li>Research: Studying typing patterns or user behavior</li><li>Personal Monitoring: Monitoring your own devices</li><li>Authorized Testing: With explicit permission from system owners</li></ul><h3>Illegal Uses ❌</h3><ul><li>Monitoring others without consent</li><li>Corporate espionage</li><li>Stealing passwords or personal information</li><li>Any unauthorized surveillance</li></ul><h3>Legal Status by Region</h3><ul><li><strong>United States:</strong> Legal when used on your own devices or with consent</li><li><strong>European Union: </strong>Subject to GDPR and privacy laws</li><li><strong>Other Jurisdictions:</strong> Laws vary significantly</li></ul><p>Always check local laws before using this tool.</p><h3>Security Implications and Defenses</h3><p>Understanding how keyloggers work helps us build better defenses:</p><h3>Detection Methods</h3><ul><li>Process Monitoring: Unusual processes accessing keyboard APIs</li><li>Network Analysis: Suspicious data transmission patterns</li><li>Behavioral Analysis: Unusual typing patterns or system behavior</li><li>Antivirus Software: Signature-based detection of known keyloggers</li></ul><h3>Prevention Strategies</h3><ul><li>Regular Security Updates: Keep systems patched</li><li>Antivirus Software: Use reputable security software</li><li>User Education: Awareness of social engineering attacks</li><li>Access Controls: Limit administrative privileges</li><li>Network Monitoring: Watch for suspicious data exfiltration</li></ul><h3>Real-World Applications</h3><p>This educational keylogger demonstrates concepts used in:</p><h3>Legitimate Software</h3><ul><li>Accessibility Tools: Assistive technology for disabled users</li><li>Productivity Software: Time tracking and activity monitoring</li><li>Security Software: Legitimate monitoring and auditing tools</li><li>Gaming Software: Macro recording and automation</li></ul><h3>Security Research</h3><ul><li>Penetration Testing: Authorized security assessments</li><li>Malware Analysis: Understanding attack techniques</li><li>Digital Forensics: Investigating security incidents</li><li>Threat Intelligence: Studying adversary techniques</li></ul><h3>Future Enhancements</h3><p>The current implementation provides a solid foundation for extensions:</p><h3>Technical Improvements</h3><ul><li>Encryption: Encrypt log files for sensitive environments</li><li>Compression: Reduce storage requirements</li><li>Filtering: Only capture specific types of keystrokes</li><li>Real-time Analysis: Process data as it’s captured</li></ul><h3>Advanced Features</h3><ul><li>Screenshot Capture: Visual context alongside keystrokes</li><li>Process Monitoring: Track which applications are being used</li><li>Network Transmission: Send data to remote servers (with proper security)</li><li>Machine Learning: Analyze patterns and detect anomalies</li></ul><h3>Conclusion</h3><p>Building this keylogger has been an enlightening journey into the world of cybersecurity. It demonstrates how seemingly simple concepts like keyboard monitoring can be powerful tools when used responsibly.</p><h3>Key Takeaways</h3><ol><li>Education First: Understanding attack techniques helps build better defenses</li><li>Ethics Matter: Always consider the legal and ethical implications</li><li>Code Quality: Robust error handling and testing are essential</li><li>Documentation: Clear documentation helps others learn and contribute</li><li>Responsible Disclosure: Share knowledge responsibly and ethically</li></ol><h3>The Bigger Picture</h3><p>This project represents more than just a keylogger — it’s a stepping stone into cybersecurity education. By understanding how these tools work, we become better equipped to:</p><ul><li>Defend Against Attacks: Recognize and prevent malicious keyloggers</li><li>Build Secure Software: Apply security principles in our own projects</li><li>Contribute to Security Research: Help improve cybersecurity practices</li><li>Educate Others: Share knowledge responsibly</li></ul><h3>Resources and Next Steps</h3><p>If you’re interested in exploring this project further:</p><ol><li>Study the Code: Review the implementation details</li><li>Run the Tests: Validate the functionality</li><li>Experiment Safely: Test on your own systems only</li><li>Learn More: Explore cybersecurity fundamentals</li><li>Contribute: Help improve the project responsibly</li></ol><p>Remember: With great power comes great responsibility. Use this knowledge ethically and legally, and always prioritize security and privacy.</p><p><em>What are your thoughts on educational cybersecurity projects? Have you built similar tools for learning purposes? Share your experiences in the comments below!</em></p><p>Project Repository: <a href="https://github.com/Kawal0508/Keylogger_tool">GitHub — Keylogger Tool</a></p><p><em>This blog post is part of a series on cybersecurity education and ethical hacking. Follow for more insights into building secure software and understanding cyber threats.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19e1d22808ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Local Clipboard Logger: A Python Project for Educational Cybersecurity]]></title>
            <link>https://medium.com/@kawalostwal/building-a-local-clipboard-logger-a-python-project-for-educational-cybersecurity-9d611f46898d?source=rss-9b21c2308d3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d611f46898d</guid>
            <category><![CDATA[system-programming]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Kawalostwal]]></dc:creator>
            <pubDate>Fri, 05 Sep 2025 18:24:04 GMT</pubDate>
            <atom:updated>2025-09-05T18:28:03.545Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding clipboard monitoring, data privacy, and responsible development practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Py9OM_XnjCc-2NCe" /><figcaption>Photo by <a href="https://unsplash.com/@jay_zhang?utm_source=medium&amp;utm_medium=referral">Jay Zhang</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Introduction<br></strong>In today’s digital landscape, understanding how applications interact with system resources like the clipboard is crucial for both developers and security professionals. This article explores building a local clipboard monitoring tool in Python — not as a malicious application, but as an educational project that demonstrates important concepts in cybersecurity, data handling, and ethical programming.</p><p><strong>Why Study Clipboard Monitoring?<br></strong>The clipboard is one of the most frequently used system resources, yet many users don’t realize how applications can access it. Understanding these mechanisms helps us:</p><p>- <strong>Build better security awareness</strong> around data handling<br>- <strong>Develop defensive programming skills</strong> for protecting sensitive information<br>- <strong>Learn about system APIs</strong> and how applications interact with the operating system<br>- <strong>Understand privacy implications</strong> of seemingly innocent applications</p><p><strong>Project Overview<br></strong>Our project creates a <strong>local-only clipboard logger</strong> that:</p><p>- Monitors clipboard text changes in real-time<br>- Logs entries to a local file with timestamps<br>- Operates transparently with no network activity<br>- Includes no persistence mechanisms<br>- Provides clear console output for user awareness</p><p><strong>Technical Implementation</strong></p><p><strong>Core Components</strong></p><p><strong>1. Clipboard Access</strong></p><pre>import pyperclip<br>def read_clipboard_text() -&gt; str:<br> try:<br> data = pyperclip.paste()<br> return data if isinstance(data, str) else str(data)<br> except Exception as exc:<br> logging.error(f&quot;Failed reading clipboard: {exc}&quot;)<br> return &quot;&quot;</pre><p><strong>2. Local Logging</strong></p><pre>def append_to_log_file(file_path: str, content: str) -&gt; None:<br> try:<br> with open(file_path, &#39;a&#39;, encoding=&#39;utf-8&#39;, errors=&#39;ignore&#39;) as fp:<br> fp.write(f&quot;\n\n- {datetime.now().isoformat()}\n{content}&quot;)<br> except Exception as exc:<br> logging.error(f&quot;Failed writing to log file: {exc}&quot;)</pre><p><strong>3. Monitoring Loop</strong></p><pre>def run_monitor(file_path: str, poll_seconds: float) -&gt; None:<br> previous_value = None<br> while True:<br> time.sleep(poll_seconds)<br> current_value = read_clipboard_text()<br> if current_value and current_value != previous_value:<br> append_to_log_file(file_path, current_value)<br> previous_value = current_value</pre><p><strong>Key Design Decisions</strong></p><p><strong>Local-Only Architecture:</strong> The tool deliberately avoids any network functionality, ensuring data never leaves the user’s machine.</p><p><strong>Transparent Operation: </strong>Console output and logging make the tool’s activity visible to users.</p><p><strong>Error Handling:</strong> Robust exception handling prevents crashes and provides meaningful error messages.</p><p><strong>Configurable Parameters: </strong>Easy modification of log paths and polling intervals.</p><p><strong>Ethical Considerations</strong></p><p><strong>What Makes This Project Ethical</strong></p><p><strong>1. Transparency</strong>: The tool’s purpose and behavior are clearly documented<br><strong>2. Local-Only</strong>: No data exfiltration or network activity<br><strong>3. User Control: </strong>Easy to start, stop, and configure<br><strong>4. Educational Focus: </strong>Designed for learning, not malicious use</p><p><strong>Responsible Development Practices</strong></p><p>- <strong>Clear Documentation:</strong> Every function and feature is well-documented<br>- <strong>Ethical Guidelines: </strong>README includes explicit warnings about misuse<br>- <strong>No Persistence:</strong> Tool doesn’t install itself or run automatically<br>- <strong>Open Source:</strong> Code is available for review and modification</p><p><strong>Learning Outcomes</strong></p><p><strong>Technical Skills Developed</strong></p><p>- Python Programming: Advanced features, error handling, file I/O<br>- System Integration: Working with OS-level APIs and resources<br>- Logging and Monitoring: Implementing robust logging systems<br>- Code Organization: Clean, maintainable project structure</p><p><strong>Security Awareness</strong></p><p>- Data Privacy: Understanding what applications can access<br>- System Security: Learning about clipboard security implications<br>- Defensive Programming: Building tools that protect user data<br>- Ethical Hacking: Responsible exploration of system capabilities</p><p><strong>Real-World Applications</strong></p><p><strong>Legitimate Use Cases</strong></p><p>- Productivity Tools: Personal clipboard history management<br>- Debugging: Understanding application clipboard interactions<br>- Security Research: Studying clipboard-based attack vectors<br>- Educational Projects: Learning about system programming</p><p><strong>Security Implications</strong></p><p>This project helps understand how malicious software might:<br>- Monitor clipboard for sensitive data (passwords, tokens)<br>- Exfiltrate information through various channels<br>- Persist on systems through multiple mechanisms</p><p><strong>Building and Testing</strong></p><p><strong>Installation</strong></p><pre>git clone &lt;repository-url&gt;<br>cd Clipboard_Hijacker<br>pip install -r requirements.txt</pre><p><strong>Running the Tool</strong></p><pre>python Clipboard_Hijacker_local_Test_Tool.py</pre><p><strong>Testing</strong></p><pre># Set test content<br>Set-Clipboard &quot;test-content&quot;<br># Run briefly<br>python Clipboard_Hijacker_local_Test_Tool.py<br># Press Ctrl+C to stop<br># Check results<br>Get-Content &quot;$env:USERPROFILE\clipboard_log.txt&quot; -Tail 10</pre><p><strong>Lessons Learned</strong></p><p><strong>Technical Insights</strong></p><p>1. Clipboard APIs: Understanding how different operating systems handle clipboard access<br>2. File I/O: Best practices for logging and data persistence<br>3. Error Handling: Building robust applications that handle edge cases<br>4. User Experience: Making tools that are both powerful and user-friendly</p><p><strong>Security Awareness</strong></p><p>1. Data Sensitivity: Recognizing what information should be protected<br>2. System Access: Understanding what permissions applications need<br>3. Privacy Implications: Learning about data collection and storage<br>4. Defense Strategies: Building tools that protect rather than exploit</p><p><strong>Future Enhancements</strong></p><p><strong>Potential Improvements</strong></p><p>- Content Filtering: Option to exclude sensitive data patterns<br>- Encryption: Local encryption of log files<br>- GUI Interface: User-friendly graphical interface<br>- Cross-Platform: Support for Linux and macOS</p><p><strong>Educational Extensions</strong></p><p>- Attack Simulation: Safe demonstration of clipboard-based attacks<br>- Defense Mechanisms: Tools to protect against clipboard monitoring<br>- Forensic Analysis: Log analysis and pattern detection<br>- Security Training: Interactive cybersecurity education modules</p><p><strong>Conclusion</strong></p><p>Building a clipboard monitoring tool teaches valuable lessons about system programming, data privacy, and ethical development. By focusing on local-only functionality and transparent operation, we create educational value without enabling malicious behavior.</p><p>The key takeaway is that understanding how systems work — including their vulnerabilities — is essential for building better security. This project demonstrates that we can explore sensitive topics responsibly while maintaining ethical standards.</p><p><strong>Key Principles for Ethical Security Projects</strong></p><p>1. Transparency: Always document what your tools do<br>2. Local-First: Avoid network activity unless absolutely necessary<br>3. User Control: Give users clear control over tool behavior<br>4. Educational Focus: Design for learning, not exploitation<br>5. Responsible Disclosure: Share knowledge to improve security</p><p>Remember: The goal is to understand and protect, not to exploit or harm. By building tools responsibly, we contribute to a more secure digital environment for everyone.</p><p><strong>NOTE:</strong> This project is available on GitHub for educational purposes. Always use responsibly and in accordance with applicable laws and ethical guidelines.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d611f46898d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building My Modern Developer Portfolio with React, shadcn/ui, Tailwind, Supabase, and Vercel]]></title>
            <link>https://medium.com/@kawalostwal/building-my-modern-developer-portfolio-with-react-shadcn-ui-tailwind-supabase-and-vercel-71ecbf54f40b?source=rss-9b21c2308d3a------2</link>
            <guid isPermaLink="false">https://medium.com/p/71ecbf54f40b</guid>
            <category><![CDATA[shadcn-ui]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[personal-portfolio]]></category>
            <dc:creator><![CDATA[Kawalostwal]]></dc:creator>
            <pubDate>Thu, 04 Sep 2025 10:55:40 GMT</pubDate>
            <atom:updated>2025-09-04T10:58:42.788Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever tried to ship a personal portfolio that looks great, performs well, and is maintainable, you know it’s deceptively complex. Here, I’ll walk through how I built my portfolio <a href="https://kawal-portfolio-website.vercel.app/">kawal-portfolio-website.vercel.ap</a>p using React, shadcn/ui, Tailwind CSS, Supabase (for dynamic data), and Vercel (for hosting). I’ll share the features, key implementation details, tricky bugs I hit, and lessons learned so you can avoid the same pitfalls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GQbzCcyfW570tif0WEp5DA.png" /></figure><p><strong>Why this stack</strong><br>- shadcn/ui + Tailwind: Elegant primitives with a scalable utility system. I get accessible components without losing control of the design system.<br>- React (CRA): Familiar, fast to iterate, and easy to host on Vercel.<br>- Supabase: Simple, SQL-first backend for projects and blog content.<br>- Vercel: Zero-config CI/CD and great DX.</p><p><strong>Core features</strong><br>- Dark/light theme with a polished toggle and consistent brand accents<br>- Responsive layout across sidebar, navbar, portfolio, and blog<br>- Dynamic portfolio projects (Supabase) with category filter on mobile/desktop<br>- Skills section redesigned as an SVG icon grid by category (including Cybersecurity)<br>- Clean, scalable CSS architecture with theme tokens and safe component overrides<br>- Production deploys via Vercel</p><p><strong>Design system and theming</strong><br>I mapped my existing CSS variables to shadcn/ui tokens so both Tailwind utilities and vanilla CSS stay in sync.</p><pre>CSS<br>:root {<br> /* Design tokens */<br> - current-bg: var( - smoky-black);<br> - current-card-bg: var( - eerie-black-2);<br> - current-border: var( - jet);<br> - current-text: var( - white-2);<br> - current-accent: var( - orange-yellow-crayola);<br>/* shadcn/ui tokens (HSL) */<br> - background: 0 0% 7%;<br> - card: 240 2% 12%;<br> - primary: 45 100% 72%;<br> - border: 0 0% 22%;<br> - radius: 0.5rem;<br>}<br>html.light-theme {<br> - background: 0 0% 98%;<br> - card: 0 0% 100%;<br> - primary: 25 95% 45%;<br> - border: 0 0% 85%;<br>}</pre><p>I enforce Tailwind’s “dark” class while keeping legacy classes for compatibility, so everything from tokens to utilities responds instantly when the theme flips.</p><p><strong>Theme toggle with shadcn-style Switch</strong><br>The theme toggle is a minimal button with an accessible `role=”switch”`, custom accent background, and inline SVG icons so it’s fully self-contained.</p><pre>JSX<br>import * as React from &quot;react&quot;;<br>import { cn } from &quot;../lib/utils&quot;;<br>const Switch = React.forwardRef(({ checked, onCheckedChange, className, …props }, ref) =&gt; (<br> &lt;button<br> type=&quot;button&quot;<br> role=&quot;switch&quot;<br> aria-checked={checked}<br> ref={ref}<br> onClick={() =&gt; onCheckedChange?.(!checked)}<br> className={cn(<br> &quot;relative inline-flex h-6 w-10 items-center rounded-full border transition-colors&quot;,<br> checked ? &quot;bg-[var( - current-accent)] border-transparent&quot;<br> : &quot;bg-[var( - eerie-black-2)] border-[var( - current-border)]&quot;,<br> className<br> )}<br> {…props}<br> &gt;<br> &lt;svg className=&quot;absolute left-1 w-3 h-3 text-white opacity-70&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot;&gt;<br> &lt;circle cx=&quot;12&quot; cy=&quot;12&quot; r=&quot;5&quot; /&gt;<br> &lt;path d=&quot;M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42–1.42M18.36 5.64l1.42–1.42&quot;/&gt;<br> &lt;/svg&gt;<br> &lt;svg className=&quot;absolute right-1 w-3 h-3 text-white opacity-70&quot; viewBox=&quot;0 0 24 24&quot; fill=&quot;none&quot; stroke=&quot;currentColor&quot;&gt;<br> &lt;path d=&quot;M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z&quot;/&gt;<br> &lt;/svg&gt;<br> &lt;span className={cn(<br> &quot;pointer-events-none block h-4 w-4 rounded-full bg-white shadow transition-transform z-10&quot;,<br> checked ? &quot;translate-x-5&quot; : &quot;translate-x-1&quot;<br> )}/&gt;<br> &lt;/button&gt;<br>));</pre><p>To keep icons and colors consistent across the site, I used specific selectors for critical accents:<br>- `.article-title::after`<br>- Scrollbars<br>- Active navbar links<br>- Icon colors in project overlays<br>- Skill icon hover effects</p><p><strong>Skills grid: icons over bars</strong><br>I replaced progress bars with a compact icon grid. Each skill can define `icon` and `darkIcon` so the correct asset is shown depending on theme. A `MutationObserver` listens to theme class changes on `&lt;html&gt;` and updates state so icons react instantly.</p><p><strong>Highlights:</strong><br>- 10 icons per row where space allows<br>- SVGs scale responsively (65px desktop, 60px mobile)<br>- Clean hover: subtle scale and contrast bump<br>- No amber background “chips”; icons sit directly on the card</p><p><strong>Mobile UX details</strong><br>- Portfolio category selector is available in mobile via a compact control that mirrors desktop filters.<br>- Testimonial avatar images are rounded on all sizes; on mobile they get `14px` radius, enforced on the `img` with `overflow: hidden` on the container to avoid square edges.<br>- Eye icon overlay in light mode uses explicit color rules so it remains visible on hover.</p><p><strong>Performance and structure</strong><br>- CSS is organized into clear sections: custom properties, reset, layout, components, themes, utilities, responsive.<br>- Tailwind is layered in `index.css` with base/components/utilities so shadcn/ui classes and my CSS don’t fight.<br>- Created a `cn` helper using `clsx` + `tailwind-merge` to avoid class conflicts in composable components.</p><pre>JS<br>import { clsx } from &quot;clsx&quot;;<br>import { twMerge } from &quot;tailwind-merge&quot;;<br>export function cn(…inputs) { return twMerge(clsx(inputs)); }</pre><p><strong>Data and deploy</strong><br>- Supabase stores projects and blog posts; the portfolio component filters client-side but fetches from Supabase so I can update content without redeploying.<br>- Vercel builds on push, with Tailwind/PostCSS pinned to versions compatible with CRA. This eliminated plugin resolution issues during production builds.</p><p><strong>Tricky issues I hit (and how I fixed them)</strong><br>- PostCSS/Tailwind plugin errors on Vercel: pin versions compatible with CRA and ensure Tailwind/PostCSS are in `dependencies` (not just `devDependencies`) for production installs.<br>- PowerShell vs bash command chaining: use PowerShell-friendly syntax (no `&amp;&amp;`).<br>- “Cannot access before initialization” for a filtered function: wrap in `useCallback` and include it in dependency arrays.<br>- CSS specificity fights: when legacy CSS has `!important`, use more specific selectors or restructure the base rule; prefer targeted overrides over blanket resets.<br>- Theme reactivity for icons: `MutationObserver` watching `&lt;html&gt;` class changes avoids race conditions and stale UI.</p><p><strong>What I’d improve next</strong><br>- Migrate from CRA to Vite or Next.js for faster builds and smoother Tailwind integration.<br>- Add content editing via Supabase Studio or a lightweight CMS wrapper.<br>- Add unit tests for UI states (theme, filters) and visual regression checks.</p><p><strong>Wrap-up</strong><br>This stack struck a great balance between design control, speed, and maintainability. shadcn/ui gave me clean, accessible building blocks; Tailwind kept styling ergonomic; and careful token mapping ensured theming was cohesive across everything — from cards to icons to overlays.</p><p>If you’re building a portfolio in 2025, this approach lets you ship a polished, production-grade site without fighting your tools.</p><p>Want the code or a walkthrough of a specific part (skills grid, theme tokens, Supabase schema)? Tell me which section and I’ll share focused snippets or diagrams.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71ecbf54f40b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>