Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Data in hidden in html files

Options
  • 02-06-2020 1:37am
    #1
    Registered Users Posts: 12


    Got a python script for searching for when metadata is hidden in files but I dont think its working as expecting. I create a text file with the below data

    <!\-\-.+\-\->
    <[Mm][Ee][Tt][Aa]

    and use it as a parameter in the below but its returning every file in the directory

    so I am presuming its not working correctly as ive manually checked the files

    #!/usr/bin/python

    import sys
    import os
    import subprocess

    directory = "."

    if len(sys.argv) > 1:
    directory = sys.argv[1]

    for root, directories, files in os.walk(directory):
    for name in files:
    print os.path.join(root, name)
    subprocess.call(["grep", "-f", "htmlPatterns.txt", os.path.join(root, name)])




    Also created an extra html file just called Bob.html and just wrote Bob in it but the script returned that as well so pretty sure its not working.


Comments

Advertisement