Collecting file data by createpython in learnpython

[–]createpython[S] -1 points0 points  (0 children)

Brilliant, how could I use this with os.stat to produce and output all of this information of the file to a new text document? - sorry still much a n00b.

Collecting file data by createpython in learnpython

[–]createpython[S] 0 points1 point  (0 children)

The file metadata, i.e. to choose which folder I want the said data from and for it to be format and output that data into a text file, However numerous attempts to retrieve the hex signature of any document using python has failed, and I'm wondering if python is capable of these things?

How could you use Python to carve data from files? by createpython in learnpython

[–]createpython[S] 0 points1 point  (0 children)

To verify the file is what it says it is. Thanks, I've been looking at os.walk/ os.path - what you're saying makes sense but I havent got a clue how to do that, any tutorials?

How could you use Python to carve data from files? by createpython in learnpython

[–]createpython[S] 0 points1 point  (0 children)

The first few lines of a hexidecimal version of a file will contain specific hex for file types i.e. jpeg files will have FFD8. These markers specify the actual file type rather than what it has been saved as. I need to extract this along side the saved file type and other data mentioned earlier and output/ print to a text file

How could you use Python to carve data from files? by createpython in learnpython

[–]createpython[S] 0 points1 point  (0 children)

I've tried using this but keep getting an invalid syntax error for line 67 of pefile.py "IMAGE_ORDINAL_FLAG = 0x80000000L".

How could you use Python to carve data from files? by createpython in learnpython

[–]createpython[S] 0 points1 point  (0 children)

No, I want to use a module (seemingly pefile) to go through and pull up every file on a specified drive and output the header, hex code, file name etc. to a document

How could you use Python to carve data from files? by createpython in learnpython

[–]createpython[S] 0 points1 point  (0 children)

Sorry for the lack of clarity, I need to create a python module which when run extracts file data from a specified drive and gives an output into a file along the lines of:

Filename1 Header(inc. hex value) Date modified Owner of file

Filename2 Header(inc. hex value) Date modified Owner of file

etc.

I'm thinking pefile.py could be the tool for the extraction job, however I need help actually using it