GithubHelp home page GithubHelp logo

sslime336 / pefile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from folbricht/pefile

0.0 0.0 0.0 9 KB

Extract resources from PE files

License: BSD 3-Clause "New" or "Revised" License

Go 100.00%

pefile's Introduction

pefile

GoDoc

Small library and tool to list and extract resources from Portable Executable (PE) files.

Installing the tool

go get -u github.com/folbricht/pefile/cmd/pe

Running the tool

List available resources in the file:

# pe list-resources /path/to/file.exe
3/1/1033
3/2/1033
5/105/1033
5/106/1033
10/SOMERESOURCE/1033
14/103/1033

Extract a single resource to STDOUT:

# pe extract-resource /path/to/file.exe 10/SOMERESOURCE/1033

Extract a single resource to a file:

# pe extract-resource /path/to/file.exe 10/SOMERESOURCE/1033 /tmp/someresource.bin

Extract all resources to a directory, preserving the directory layout from the PE file.

# pe extract-resources /path/to/file.exe /tmp/resources

Using the library

f, err := pefile.Open("/path/to/file.exe")
if err != nil {
  return err
}
defer f.Close()
resources, err := f.GetResources()
if err != nil {
  return err
}
for _, r := range resources {
  fmt.Println("Name:", r.Name, ", Size:", len(r.Data))
}

References

pefile's People

Contributors

folbricht avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.