Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SyntaxWarning by using raw strings in create_malpdf4 function #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thetowsif
Copy link

Overview
This pull request resolves a SyntaxWarning: invalid escape sequence '\w' that occurs when running the malicious-pdf.py script. The warning arises due to unescaped backslashes in the XML stylesheet URL in the create_malpdf4 function. The issue has been fixed by marking the string as a raw string using the r'' prefix.

Changes Made

  • Updated the create_malpdf4 function to use raw string literals (r'') for better handling of backslashes in file paths and XML attributes.

  • This change ensures that the backslashes (\) are interpreted literally without raising warnings during execution.

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