Moshe
Moshe

Reputation: 2668

Extracting strings from PE files

I'm writing some code (Python, but really isn't important) that analyzes strings inside PE files. I'm looking for a command line tool I could invoke that will return the complete list of strings inside the PE file.

I know PEDUMP, but it seems to give incomplete strings.

Also, it is very important that this tool would be able to handle with different type of strings, such as C-strings (NULL terminated), Pascal-strings (length prefix), etc.

I found "string extractor" here, but it costs money and I'm not sure if it can handle different type of strings.

Do you know of any tool that answers my requirements?

Upvotes: 0

Views: 3397

Answers (2)

zed_0xff
zed_0xff

Reputation: 33217

http://pedump.me can show all strings from your PE

Upvotes: 0

Greg Hewgill
Greg Hewgill

Reputation: 993015

There's the classic unix program strings which does exactly this.

Although strings isn't specifically designed to handle Pascal-style strings, it will dump them out anyway because they will appear to be textual data.

Some implementations of strings can handle Unicode (UTF-8 and UTF-16) strings too.

Upvotes: 1

Related Questions