Skip to content

Conversation

@AnanyaPrasanthan
Copy link

CyberScan Python 3 Migration - PR Description

Summary

This PR migrates CyberScan from Python 2.7 to Python 3, resolving critical compatibility issues that prevented the script from running on modern systems. The original code was failing with ImportError: No module named pcapy and numerous Python 2 syntax errors. The solution involved running the lib2to3 conversion tool to update deprecated syntax (exception handling, print statements, long integers, dictionary methods), fixing removed modules (UserDict, new), and replacing the bundled outdated scapy_local library with the modern scapy package from PyPI. Additionally, PowerShell execution policies were configured to allow virtual environment activation on Windows.

The migration also addresses Windows-specific requirements for network scanning operations. Changes include proper error handling for missing Npcap installations, updated documentation with administrator privilege requirements, and a clean dependency management system using requirements.txt. Testing confirms all core functionality works correctly: help menu displays properly, ICMP pings succeed (tested with 8.8.8.8), and port scanning operates as expected when run with administrator privileges. The PR includes comprehensive README updates documenting Python 3.8+ requirements, step-by-step Windows setup instructions, Npcap installation guidance, and solutions for common errors like execution policy blocks and raw socket permission issues.


Files Changed: CyberScan.py (updated imports), requirements.txt (added), .gitignore (added), README.md (updated), scapy_local (2to3 conversion applied)

Testing: Verified on Windows 10 with Python 3.x | All scanning modes functional | Documentation complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant