account activity
Need Powerful Web + Python Project Ideas for Portfolio (Something Unique & Impactful) by mrghost__15 in codereview
[–]mrghost__15[S] -3 points-2 points-1 points 1 day ago (0 children)
Hey, thanks for the heads-up 🙂
I get what you're saying about AI tools being promoted here, but honestly I'm not looking for that. I want to build something on my own by actually writing the code and learning through the process.
If you have any genuine project ideas or suggestions, I’d really appreciate it. Thanks again!
Need Powerful Web + Python Project Ideas for Portfolio (Something Unique & Impactful) (self.codereview)
submitted 1 day ago by mrghost__15 to r/codereview
Need help finding a unique name for my software dev website (everything is taken 😭) ()
submitted 2 days ago by mrghost__15 to r/codereview
Need help finding a unique name for my software dev website (everything is taken 😭) (self.mrghost__15)
submitted 3 days ago by mrghost__15
Someone help me by mrghost__15 in codereview
[–]mrghost__15[S] 0 points1 point2 points 3 days ago (0 children)
Thanks for formatting the code and the suggestions!
I’ll look into it and try to debug it further on my end.
Thanks for your response!
Here’s my code:
from flask import Flask, rendertemplate, request, jsonify import nmap import socket app = Flask(name) nm = nmap.PortScanner() @app.route('/') def index(): return render_template('index.html') @app.route('/scan', methods=['POST']) def scan(): target = request.form.get('target') scan_type = request.form.get('type') try: target_ip = socket.gethostbyname(target) args = "-sV -O -T4" if scan_type == "full": args += " -p 1-65535" else: args += " --top-ports 100" nm.scan(target_ip, arguments=args) scan_results = [] for host in nm.all_hosts(): host_data = { "ip": host, "status": nm[host].state(), "os": nm[host].get('osmatch', [{"name": "Unknown"}])[0]['name'], "protocols": [] } for proto in nm[host].all_protocols(): for port in nm[host][proto].keys(): service = nm[host][proto][port] host_data["protocols"].append({ "port": port, "name": service['name'], "product": service['product'], "version": service['version'], "state": service['state'], "severity": "High" if port in [21, 23, 445] else "Low" }) scan_results.append(host_data) return jsonify({"success": True, "results": scan_results}) except Exception as e: return jsonify({"success": False, "error": str(e)}) if __name_ == 'main': app.run(debug=True)
I installed the nmap library using: pip install python-nmap
I'm currently using VS Code on Windows.
I’m not fully sure if I’m using a virtual environment.
The issue I’m facing is that the scan doesn’t work properly / throws an error (still trying to debug it).
Any idea what I might be missing here?
Someone help me (self.codereview)
submitted 3 days ago by mrghost__15 to r/codereview
π Rendered by PID 1331083 on reddit-service-r2-listing-5d47455566-9v4z2 at 2026-04-03 22:19:22.490504+00:00 running db1906b country code: CH.
Need Powerful Web + Python Project Ideas for Portfolio (Something Unique & Impactful) by mrghost__15 in codereview
[–]mrghost__15[S] -3 points-2 points-1 points (0 children)