Skip to content

Conversation

@KoikyLansoy
Copy link

Migration from Python 2.7 to Python 3

Summary

This PR migrates the AnalyzePDF script from Python 2.7 to Python 3, ensuring compatibility with modern Python environments while keeping existing functionality unchanged.

🧪 Testing

  • Script compiles without syntax errors
  • YARA rules compile successfully
  • All print statements display properly
  • Tested with : classic pdf, multiple filtering, invalid_xref_numbers as I changed the regex

🔍 Changes

  • None - All functionality preserved
  • Script now requires Python 3.x instead of Python 2.7
  • YARA library dependency updated to yara-python in doc

- Replace all 'print text' with 'print(text)'
- Update shebang from python to python3
- Update documentation to reflect Python 3.x requirement
- Replace 'except Exception, msg:' with 'except Exception as msg:'
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