Git Product home page Git Product logo

Comments (2)

CyberTech avatar CyberTech commented on August 23, 2024

I'm just another user of pedump, but this doesn't seem like something that should be native to pedump, considering how trivial it is to process an archive.

The following code is (untested, and uncompiled even) a rough idea of how you would do this with an archive, checking for all *.dll, *.exe, and *.sys files within. You could also simply ignore the filename, and pass all the files to pedump (since you're talking about malicious artifacts which may not have correct naming), making sure you've got begin/rescue in place to handle pedump throwing an error.

Zip::InputStream.open("my.zip") do |io|
    while entry = io.get_next_entry
        if !entry.symlink? && entry.file? && entry.name ~= /\.(exe|dll|sys)$/
            # lib/pedump.rb may need extended to know about ZipInputStream, currently it 
            # knows only about String (open a file) and ::IO, 
            # However, it has a default fallback that may handle ZipInputStream
            PEdump.dump(entry.get_input_stream) 
        end
    end
end

-- CyberTech

from pedump.

zed-0xff avatar zed-0xff commented on August 23, 2024

I strongly agree with @CyberTech that zip file reading can and should be implemented outside of pedump.

from pedump.

Related Issues (13)

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.